Difference between revisions of "Manual:DIL Manual/goto"

From DikuMUD Wiki
Jump to navigation Jump to search
(XML import)
 
(No difference)

Latest revision as of 13:08, 27 May 2020


goto:
    The goto statement lets you jump about in the code.
    Labels in your DIL programs, for 'goto' or interrupts
    are defined within ':'. For an example, see the program below.
Example:

 dilbegin foo();
   code
   {
     :mylabel:
     exec("say Hello world",self);
     pause;
     goto mylabel;
   }
   dilend
---~---~---~---~---~---~---~---~---