Exit

From EDukeWiki
Jump to navigation Jump to search

The exit command breaks out of a loop, in the way one would normally from "break" commands in other languages. It should not be used outside of loops.

It should be used instead of break if the intention is to actually leave the loop early.

See also continue, return and terminate.

Example

   set j 0
   whilen j 3
   {
       add j 1
       userquote 500
       exit
       userquote 400
   }

Makes quote 500 be displayed exactly once, and quote 400 not a single time.