CONTINUE

Statement

Syntax

Skips the rest of the current pass and starts the next pass of the innermost loop.

CONTINUE

Good to know

  • In a FOR, the step is added before the next pass. In a WHILE or a REPEAT, the condition is tested first.
  • It acts on the innermost FOR, FOREACH, WHILE, REPEAT or DO loop, even from inside a SELECT.
  • Outside any loop it is a compile error: "CONTINUE without an active loop".
  • In the DO frame loop, CONTINUE skips the Sync() below it. If it fires on every pass, the game freezes. Put Sync() before the CONTINUE, or use IF … ELSE.

Example

total = 0FOR i = 1 TO 10  IF Mod(i, 2) = 0 THEN CONTINUE  total = total + iNEXTConsole(Str(total))   ' 25
In the manual : Control flow