1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-26 07:25:53 +00:00
QB64-PE/internal/help/END.txt
SMcNeill 6e01fc8dce Altered string compare routines (<,<=,>,>=) so they don't give false results with CHR$(0).
Added new _STRCMP and _STRICMP commands for quick string comparisons.
Cleaned up QB64 to finish removing the QUI (quick user insert) code and folders.
Altered UCASE and LCASE routines to be faster in some situations for us.
2014-09-22 08:19:03 -04:00

54 lines
1.8 KiB
Plaintext

The {{KW|END}} statement terminates a program without an immediate exit or ends a procedure or statement block.
{{PageSyntax}}
::: END
::: END [[IF...THEN|IF]]
::: END [[TYPE]]
::: END [[SELECT CASE|SELECT]]
::: END [[SUB]]
::: END [[FUNCTION]]
QB64 {{PageSyntax}}
::: END [return_code%]
::: END [[DECLARE LIBRARY|DECLARE]]
* In '''QB64''' END can be followed by a code that can be read in another module using the [[SHELL (function)|_SHELL]] or [[_SHELLHIDE]] function.
* When END is used to end a program a pause and &quot;Press any key to continue...&quot; is displayed at the bottom of the window.
* If the program does not use END or [[SYSTEM]] the program will still end with a pause and display &quot;Press any key to continue...&quot;.
* In '''QB64''' [[SYSTEM]] will end the program immediately and close the window.
* The '''QB64''' [[_EXIT (function)]] can block a user's Ctrl + Break key press or click on the window X box until the program is ready.
* When running a Qbasic BAS module from the command line, use [[SYSTEM]] to avoid returning to the [[IDE]].
''Example:'' In QB64 you won't return to the IDE unless you are using it to run or edit the program module.
{{CodeStart}} '' ''
{{Cl|PRINT}} &quot;Hello world!&quot;
{{Cl|END}}
{{Cl|PRINT}} &quot;Hello no one!&quot; '' ''
{{CodeEnd}}
''Returns:''
{{OutputStart}}
Hello world!
Press any key to continue...
{{OutputEnd}}
:''Explanation:''&quot;Hello no one!&quot; isn't returned because the program ended with the END statement no matter what is after that.
:The message &quot;Press any key to continue...&quot; is displayed after the program ends in QB or '''QB64'''.
{{PageSeeAlso}}
* [[SYSTEM]] {{text|(immediate exit)}}
* [[SHELL (function)]], [[_SHELLHIDE]]
* [[EXIT]] (statement), [[_EXIT (function)]]
{{PageNavigation}}