NET/MASTER Network Control Language (NCL) Programmer's Guide

Single and Repetitive Execution
Controlling Execution Flow
106160 Tandem Computers Incorporated 5–7
expri
specifies an expression that must evaluate to 0 or a positive integer. This gives an
initial value to the control variable the first time through the loop.
The following example shows an NCL procedure that uses a control variable without
keywords in a DO loop:
zex0504n: PROCEDURE
/* Control variable without keywords in a DO loop */
DO &control = (10 * &1)
SAY &control
END
SAY "The final value of &control is "&control
END zex0504n
The initial value of the control variable, &CONTROL, is determined by the value of
the expression (10 * &1) following the equal sign (=). The value of the expression is
determined by the value of the parameter &1, which is passed to the procedure when
it is executed.
The following screen shows the results of executing the procedure:
(09:14) --------------------- OPERATOR CONTROL SERVICES ----------------------
START ZEX0504N 5
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
MSGS LOST ------------------ NonStop NET/MASTER D30 ---------------- --------
M=>
The value of the parameter &1 passed to the procedure is 5. Accordingly, the initial
value of the control variable is 50. The MSGS LOST caption indicates that the number
of roll-delete messages arriving at the OCS window exceeds the maximum that can be
retained in the roll-delete message queue (the default maximum is 200 messages).