EXECUTES THE NEXT STATEMENT OR THE NEXT BLOCK OF STATEMENTS TO THE "UNTIL" COMMAND
ACTION
The command is a part of the loop REPEAT/UNTIL, and is used to define the end of the statements to be executed when the logical condition is true.
While condition is true, all the statements till REPEAT are executed. Otherwise, the execution jumps to the statement just after UNTIL.
The "condition" is a single logical expression (built with comparators >, <, >=, <>, =, ...) or a complex expression combined with logical operators AND, OR, NOT and parenthesis. Only the result (True or False) is used to execute or not a statement or a block of statements.
Important remark: as the test of the looping condition is performed at the level of command UNTIL, all the statements between REPEAT and UNTIL are executed at least one time.
SYNTAX:
REPEAT
USE ERROR EXAMPLE
dim a
a=0
rem display all the digits from 0 to 9
repeat
print a
a=a+1
until a=10
REPEAT
REPEAT
SEE ALSO
WHILE
END_WHILE
IF
THEN
ELSE
END_IF
UNTIL
AND
OR
NOT