With the statement WHILE you can run a certain ITP Model ( part ) zero, one or more times depending on the test you want to perform. The model part between DO and OD will be executed as often as the test formula is TRUE.
Definition of the statement WHILE:
WHILE The Test
DO
ITP-model part with declarations
OD
The test value must be changed inside the DO … OD part of the statement. Otherwise, the test will never become FALSE and the WHILE loop will never end.
#BEGIN
NUMBER counter := 3
WHILE counter > 0
DO
#
The counter is @(number(counter;0))
#
ASSIGN counter := counter – 1
OD
END#
Result:
The counter is 3
The counter is 2
The counter is 1