The EGL continue statement
returns control to the start of a block of code controlled by a for, forEach,
or while statement.
EGL evaluates
the conditions for continuing the loop at that point, and either continues
running the loop or exits and continues processing with the next statement
after the loop.
The continue statement must be in the
same function as the containing statement. You cannot get the return
of control by putting the continue statement
in a function that you call from inside the loop.
Syntax
- statement
- You can specify the type of EGL statement that you want to continue,
whether for, forEach,
or while statement. This option is useful
when you are deep in nested loops. Processing continues with the nearest
embedding statement of the specified type.
- label
- A label that is attached to an enclosing for, forEach,
or while statement. Processing continues
with the referenced statement.
The following example assumes that you have
coded a print function named
printReport.
for (i from 1 to 100 by 1)
printReport(myList[i]);
if ((i % 10) != 0)
continue;
end // if
printReport(blankLine);
end // for
That code prints the members of a list, inserting
a blank line between each group of ten.
Compatibility
Table 1. Compatibility
Target |
Issue |
Java |
No issues |
JavaScript |
continue is not supported.
|