EXIT_WHILE

EXIT_WHILE

IN A LOOP WHILE/END_WHILE, JUMPS TO THE STATEMENT JUST AFTER END_WHILE

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

ACTION

The command EXIT_WHILE ends a loop WHILE/END_WHILE by executing the statement just after END_WHILE. It must belong to a loop WHILE/END_WHILE, and must be between a WHILE and an END_WHILE statements.

SYNTAX: EXIT_WHILE

USE

  • EXIT_WHILE is used, associated to WHILE and END_WHILE, to exit the loop.

ERROR

  • If EXIT_WHILE is not between a WHILE and an END_WHILE statements.
  • If there is no loop WHILE/END_WHILE.

EXAMPLE

dim a%

a%=0

while a%<10

print a%

a%=a%+1

if a%=5 then exit_while

end_while

SEE ALSO

WHILE

END_WHILE

EXIT_FOR

EXIT_REPEAT