Manual:DIL Manual/goto

From DikuMUD Wiki
< Manual:DIL Manual
Revision as of 13:08, 27 May 2020 by Nove (talk | contribs) (XML import)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


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
---~---~---~---~---~---~---~---~---