Futurebasic/Language/Reference/exit case
Appearance
EXIT structure statement
[edit | edit source]EXIT <structure>
[edit | edit source]Statements
[edit | edit source]✔ Appearance ✔ Standard ✔ Console
Syntax
[edit | edit source]EXIT CASE
EXIT DO
EXIT FOR
EXIT NEXT
EXIT UNTIL
EXIT WEND
EXIT WHILE
Revised
[edit | edit source]May 30, 2000 (Release 3)
Description
[edit | edit source]When used inside a FOR/NEXT
loop, WHILE/WEND
conditional, DO/UNTIL
conditional, or in a SELECT CASE
structure, this statement causes the program to jump immediately to the line following the NEXT
, WEND
, UNTIL
, or END SELECT
statement. This is useful when, you wish to break out of a loop because a certain condition has been met. EXIT
is a safe way to do it.
Example:
FOR x = 1 TO 10
IF FN BUTTON THEN EXIT FOR
NEXT x
See Also
[edit | edit source]FOR; While; Do; Select Case