mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-09-04 11:10:15 +00:00
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).
34 lines
1.2 KiB
Text
34 lines
1.2 KiB
Text
{{QBDLDATE:05-20-2022}}
|
|
{{QBDLTIME:23:16:59}}
|
|
The {{KW|SYSTEM}} statement immediately closes a program and returns control to the operating system.
|
|
|
|
|
|
{{PageSyntax}}
|
|
:'''SYSTEM''' [return_code%]
|
|
|
|
|
|
{{Parameters}}
|
|
* QB64 allows a ''code'' number to be used after SYSTEM to be read in another program module by the [[SHELL]] or [[_SHELLHIDE]] functions.
|
|
|
|
|
|
''Usage:''
|
|
* This command should be used to close a program quickly instead of pausing with [[END]] or nothing at all.
|
|
* A code can be added after the statement to send a value to the [[SHELL (function)]] or [[_SHELLHIDE]] function in another module.
|
|
* SYSTEM ends the program and closes the window immediately. The last screen image may not be displayed.
|
|
|
|
|
|
|
|
''QBasic or QuickBASIC:''
|
|
* '''QBasic BAS files can be run like compiled programs without returning to the IDE when [[SYSTEM]] is used to [[END|end]] them!'''
|
|
* If a program BAS module is run from the IDE, stopped by Ctrl-Break or an error occurs the QB program will exit to the IDE.
|
|
* To run a QuickBASIC program without the IDE use the following DOS command line: {{text|QB.EXE /L /RUN filename.BAS|green}}
|
|
|
|
|
|
{{PageSeeAlso}}
|
|
* [[SHELL (function)]]
|
|
* [[_SHELLHIDE]] {{text|(function)}}
|
|
* [[_EXIT (function)]], [[END]]
|
|
|
|
|
|
{{PageNavigation}}
|
|
|