1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-01 13:50:36 +00:00
QB64-PE/internal/help/EXIT_1111.txt
Roland Heyder aeb9c0668b Updates help files for use with new Wiki parser (2nd try)
Note: Many files were removed (not yet existing/empty pages). The parser will try to download them on demand and will auto-generate text for missing pages (eg. most _gl pages).
2022-05-21 00:18:31 +02:00

39 lines
1.4 KiB
Plaintext

{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:13:15}}
The [[EXIT]] statement is used to exit certain QBasic procedures.
{{PageSyntax}}
: [[EXIT]] {DO|WHILE|FOR|SUB|FUNCTION|SELECT|CASE}
{{PageDescription}}
* [[EXIT]] leaves any of the following procedures immediately.
** [[EXIT]] DO exits a [[DO...LOOP]].
** [[EXIT]] WHILE exits a [[WHILE...WEND]] loop.
** [[EXIT]] FOR exits a [[FOR...NEXT]] counter loop.
** [[EXIT]] SUB exits a [[SUB]] procedure before it ends. Use before any [[GOSUB]] procedures using [[RETURN]].
** [[EXIT]] FUNCTION exits a [[FUNCTION]] procedure before it ends. The value passed by the function's name should be defined.
** [[EXIT]] SELECT exits a [[SELECT CASE]] block.
** [[EXIT]] CASE does the same as EXIT SELECT unless when used in a '''SELECT EVERYCASE''' block; in such case, execution proceeds to the next CASE evaluation.
* EXIT statements normally use an [[IF...THEN]] statement to evaluate a program condition that would require the EXIT.
* To exit a program and allow the last program screen to be displayed with the message "Press any key to continue...", use [[END]].
* To exit the program immediately, use [[SYSTEM]].
{{PageAvailability}}
* '''EXIT SELECT/CASE''' available in:
** '''QB64 1.5 and up''' (QB64 Team)
** '''QBPE 0.5 and up''' (QB64 Phoenix Edition)
* All other variants available in all versions of QB64
{{PageSeeAlso}}
* [[_EXIT (function)]]
* [[END]], [[SYSTEM]]
* [[STOP]]
{{PageNavigation}}