SYSTEM

From QB64 Wiki

Jump to: navigation, search

The SYSTEM statement properly closes a Qbasic program in DOS and can avoid exiting to the QBasic IDE.


Syntax:

SYSTEM [return_code%]


Description:

  • In QB64 SYSTEM can be followed by a code that can be read in another module using the _SHELL or _SHELLHIDE function.
  • 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.
  • 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.
  • In QB64 SYSTEM ends the program and closes the window immediately. The last screen image may not be displayed.
  • Qbasic BAS files can be run like compiled programs without returning to the IDE when SYSTEM is used to end them!
  • To run a QuickBasic program without the IDE use the following DOS command line: QB.EXE /L /RUN filename.BAS


See also:



Navigation:
Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page
Personal tools
Toolbox