REPEAT

With the statement REPEAT an ITP Model can be executed one or more times. The part between REPEAT and UNTIL will be repeatedly executed. If the UNTIL formula yields the value FALSE the ITP model part will be executed again. If the formula yields the value TRUE the execution will stop.

Definition statement REPEAT:

REPEAT 
ITP-model part with declarations
UNTIL stop_test (* formula of the type BOOL *)

The code between REPEAT and UNTIL will always be run once. If you want to optionally not run it, you must use the statement WHILE.

#BEGIN
NUMBER counter := 3
DO
REPEAT
#
The counter is @(number(counter;0))
#
ASSIGN counter := counter – 1
UNTIL counter = 0
OD
END#


Result:
The counter is 3
The counter is 2
The counter is 1