REPEAT

The REPEAT statement executes a block of instructions and then checks the UNTIL condition. While the UNTIL condition evaluates to FALSE the block of instructions is repeated once more.

The following is a definition of the statement.

REPEAT 
   <Template scripting part with declarations>
UNTIL stop_test (* formula of the type BOOL *)

The code between REPEAT and UNTIL always runs once. If you want to optionally not run it, use the statement WHILE (see WHILE).

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

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