The REPEAT-UNTIL control structure is a loop with an end query. It is executed until the condition is fulfilled. A repeat loop is therefore executed at least once as the test is only carried out after each loop.
The syntax is
REPEAT
… statements …
UNTIL condition
The condition is a logical comparison in the form expression logical operator expression.
The BREAK control command can be used to exit the loop immediately.
The CONTINUE control command starts the next iteration immediately.
Example
A = 1
REPEAT
A = A + 1
PRINT A, A * A, A* A * A
UNTIL A = 10