The range of a DO construct includes all the statements and
constructs that follow the DO statement, up to and including the
terminal statement. If the DO construct contains another construct,
the inner (nested) construct must be entirely contained within the
DO construct.
Execution of a DO construct differs depending on how the loop is
controlled, as follows:
- If there is no loop control (a simple DO construct),
statements in the DO range are repeated until the DO statement
is terminated explicitly by a statement within the range.
- If loop control is a DO WHILE statement, the DO range
is repeated as long as a specified condition remains true.
Once the condition is evaluated as false, the DO construct
terminates. (For more information on the DO WHILE statement,
see Section 7.5.3.)
- If loop control is specified as do-var = expr1, expr2
[,expr3], an iteration count specifies the number of times
the DO range is executed. (For more information on iteration loop
control, see Section 7.5.2.1.)
Previous Page Next Page Table of Contents