NET/MASTER Network Control Language (NCL) Reference Manual

ITERATE
Core Statements
2–32 106126 Tandem Computers Incorporated
ITERATE The ITERATE core statement performs the next iteration of a repetitive DO group by
logically passing control to the DO group’s END statement.
The ITERATE statement terminates all blocks nested between the DO group whose
label is specified in the ITERATE core statement (the target DO group) and the
ITERATE statement itself.
If you do not specify a label after the ITERATE statement, control passes by default to
the END statement of the innermost repetitive DO group in which the ITERATE
statement appears. For this purpose, the ITERATE statement ignores any noniterative
DO groups. If you specify a label after the ITERATE statement, it must be a constant
label. See Section 8, “Compiler Operation,” for the definition of a valid NCL label.
ITERATE [
label
]
label
specifies the label of a DO group. If omitted, ITERATE performs the next iteration
of the DO group in which it is contained. The ITERATE statement continues
execution at the END statement of this DO group. See the given example of this
core statement.
The ITERATE statement terminates any other DO groups inside the target DO
group. NCL generates a compilation error if the label specified is not that of a
repetitive DO group that encloses the ITERATE statement.
Considerations
If an activated ON block is crossed when terminating DO groups, all intermediate
ON blocks are terminated. (The ON core statement, described later in this section,
defines an ON block.)
See also DO and LEAVE. The DO core statement contains the ITERATE statement
as a special case for interrupting the flow of a DO loop without terminating the
loop. The LEAVE core statement allows you to interrupt a DO loop
unconditionally, as if an exit condition had been satisfied.