Continue (Reserved Word)

image\trumpet2.gif Disclaimer

The Continue reserved word transfers control to the end of a loop, bypassing any statements between it and the last statement of the loop.  

Syntax

Continue;

Remarks

When a Continue statement is encountered in a Repeat loop, the Until expression is evaluated and the next iteration of the loop proceeds if needed.    In a For loop or While loop, reaching the End of the loop causes the loop to re-evaluate.

Example

In the following example, the Print statement before Continue is executed 3 times, but the Print  statement after Continue is never evaluated.  When the loops until condition is true and the loop exits, the Print statement following the loop is executed.  The resulting output is what would appear in the Print Log of the EasyLanguage Output Bar.

Repeat

  i = i+1;
Print("Before Continue");
Continue;
Print("This message never prints");

Until (i >= 3);

Print("After the loop");

 

Output (as seen in the Print Log)

  Before Continue

  Before Continue

  Before Continue

  After the loop