NET/MASTER Network Control Language (NCL) Reference Manual

DO
Core Statements
106126 Tandem Computers Incorporated 2–15
The following example is similar to the previous example, but uses the UNTIL
keyword instead of the WHILE keyword. The result is the same as in the previous
example:
UNTIL_PROC: PROCEDURE
/* do group using the UNTIL keyword */
&NUMBER = 1
DO UNTIL &NUMBER > 10
SAY &NUMBER
&NUMBER = &NUMBER + 1
END
SAY "THE FINAL VALUE OF &NUMBER IS "&NUMBER
END UNTIL_PROC
The effects of these last two examples can be summarized as follows: WHILE testing of
the control variable takes place before each iteration; UNTIL testing of the control
variable takes place after each iteration.