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

Single and Repetitive Execution
Controlling Execution Flow
5–12 106160 Tandem Computers Incorporated
The following screen shows the results of executing the procedure:
(10:54) --------------------- OPERATOR CONTROL SERVICES ----------------------
START ZEX0507N
1
1.5
2
2.5
3
The final value of &control is 3.5
NNM1005 START ZEX0507N PROCESSING COMPLETE. NCLID 003004
_____________________________________________________________________________
---------- ------------------ NonStop NET/MASTER D30 ---------------- --------
M=>
Repetitive Execution Using
Conditional Clauses
A conditional clause indicates the condition under which the DO loop is executed.
There are two keywords that control conditions: WHILE and UNTIL. The following
table summarizes the meaning of the WHILE and UNTIL keywords:
Keyword Meaning
WHILE Introduces an expression that is tested before each iteration of a DO loop. If the
expression is TRUE, the loop is executed at least one more time.
UNTIL Introduces an expression that is tested after each iteration of a DO loop. If the
expression is FALSE, the loop is executed at least one more time.
The result of evaluating a conditional clause is either 1 (TRUE) or 0 (FALSE). This is
called a Boolean result.
Repetitive Execution Using the WHILE Keyword
A WHILE clause introduces an expression that is tested before each iteration of a DO
loop. The syntax of a DO loop that uses the WHILE keyword is the following:
DO WHILE
exprw
statement1
statement2
statement3
END