
|
<<
Index
>>
|
FutureBasic 5
|
exit <label>
|
|
statement
|
|
Syntax:
exit "label"
Description:
This statement causes the program to jump to the statement following the indicated label. Unlike the goto
statement, the exit <label>
statement makes sure that any loops, long if
blocks, local fn
's, etc., that are being "jumped out" of get properly closed, so that the stack will be in a consistent state.
If an exit "Label"
is in the main program, the "Label"
must be inside the main. If an exit "Label"
is in a local fn
, the "Label"
must be inside the same local fn
. If an exit "Label"
is nested inside one or more select [case]
statements, the "Label"
must be after the last end select
.
Any exceptions to the above conditions could result in substantial penalties or crashes.
See Also:
goto; exit fn