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

From DikuMUD Wiki
Jump to navigation Jump to search
(XML import)
 
(XML import)
 
Line 1: Line 1:
 +
<span id="dccont"></span>
 +
'''continue:'''
 +
    The continue statement makes you jump to the top
 +
    of any loop you're currently in.
 +
 +
'''Example:'''
  
 +
<nowiki>
 +
 +
  dilbegin foo();
 +
  code
 +
dilend</nowiki>
  
 +
---~---~---~---~---~---~---~---~---
 
<span id="dccont"></span>
 
<span id="dccont"></span>
 
  '''continue:'''
 
  '''continue:'''
Line 12: Line 24:
 
   dilbegin foo();
 
   dilbegin foo();
 
   code
 
   code
  {
+
dilend</nowiki>
    while (self.inside) {
 
      if (self.position &lt POSITION_SLEEPING)
 
        break;
 
      pause;
 
      if (self.hp<0) continue;
 
      exec("say I own something", self);
 
      pause;
 
    }
 
  }
 
  dilend</nowiki>
 
  
 
  ---~---~---~---~---~---~---~---~---
 
  ---~---~---~---~---~---~---~---~---

Latest revision as of 22:38, 4 December 2025

continue:
    The continue statement makes you jump to the top
    of any loop you're currently in.
Example:

   dilbegin foo();
   code
dilend
---~---~---~---~---~---~---~---~---

continue:
    The continue statement makes you jump to the top
    of any loop you're currently in.
Example:

   dilbegin foo();
   code
dilend
---~---~---~---~---~---~---~---~---