NET/MASTER Network Control Language (NCL) Reference Manual
DO
Core Statements
106126 Tandem Computers Incorporated 2–11
Note A target label is one that is the object of a CALL, GOTO, GOSUB, FUNCTION, or SIGNAL core
statement.
repetitor
specifies one of three mutually exclusive formats for the repetitive execution of a
DO group.
repetitor
uses its own set of operands and an internal counter to
control the number of repetitions of the DO group. The syntax of
repetitor
is:
control-variable
specifies a variable that controls the execution of the iterative DO loop.
exprt
,
exprb
, and
exprf
all have a default of 1 if they are omitted. There is
no default for
expri
, which must be specified and which must be a local
simple variable.
=
expri
specifies the initial value of
control-variable
.
expri
must specify a
real numeric value, and it must be specified if you use the control-variable
option of
repetitor
.
TO
exprt
specifies the final maximum value of
control-variable
. Execution of
the DO group is repeated until the absolute value of
control-variable
equals or exceeds the absolute value of
exprt
.
exprt
must specify a real
numeric value.
BY
exprb
specifies the value used to increment
control-variable
on each
iteration. If
exprb
is negative,
control-variable
is decremented.
exprb
must specify a real numeric value.
FOR
exprf
limits the execution of the loop. You can continue the repetition for the
number of iterations specified in
exprf
.
exprf
must specify a positive
integer.
FOREVER
indicates that you want the DO group to be executed until it is terminated by
some other condition, such as failing a WHILE expression test or branching
out of the DO group.