NET/MASTER Network Control Language (NCL) Programmer's Guide
Single and Repetitive Execution
Controlling Execution Flow
106160 Tandem Computers Incorporated 5–13
exprw
specifies an expression that must evaluate to 1 (TRUE) or 0 (FALSE). If the
expression is true, the loop is reexecuted. If the expression is false, execution
continues with the statement following the END statement.
The following example shows an NCL procedure that uses the WHILE keyword in a
DO loop:
zex0508n: PROCEDURE
/* DO loop with the WHILE keyword */
&number = 1
DO WHILE &number <= 10
SAY &number
&number = &number + 1
END
SAY "The final value of &number is "&number
END zex0508n
The DO loop is executed while the value of the variable &NUMBER is less than or
equal to 10.
The following screen shows the results of executing the procedure:
(11:31) --------------------- OPERATOR CONTROL SERVICES ----------------------
START ZEX0508N
1
2
3
4
5
6
7
8
9
10
The final value of &number is 11
NNM1005 START ZEX0508N PROCESSING COMPLETE. NCLID 003006
_____________________________________________________________________________
---------- ------------------ NonStop NET/MASTER D30 ---------------- --------
M=>