EXIT_REPEAT

EXIT_REPEAT

IN A LOOP REPEAT/UNTIL, JUMPS TO THE STATEMENT JUST AFTER UNTIL

  • Type: Command
  • Parameter: 0
  • Group: Structures

ACTION

The command EXIT_REPEAT ends a loop REPEAT/UNTIL by executing the statement just after UNTIL. It must belong to a loop REPEAT/UNTIL, and must be between a REPEAT and an UNTIL statements.

SYNTAX: EXIT_REPEAT

USE

  • EXIT_REPEAT is used, associated to REPEAT and UNTIL, to exit the loop.

ERROR

  • If EXIT_REPEAT is not between a REPEAT and an UNTIL statements.
  • If there is no loop REPEAT/UNTIL.

EXAMPLE

dim a%

a%=0

repeat

print a%

a%=a%+1

if a%=5 then exit_repeat

until a%=10

SEE ALSO

REPEAT

UNTIL

EXIT_FOR

EXIT_REPEAT