Home > Commands N-Z > Commands Q

QBASIC


Description | Syntax | Parameters | Switches | Related | Notes | Examples | Errorlevels | Availability

Starts QBasic, a program that reads instructions written in the Basic computer language and interprets them into executable computer code.

The QBasic program provides a complete environment for programming in the Basic language. QBasic includes extensive online Help. For more information about using QBasic, press ENTER immediately after starting QBasic or press F1 any time while running QBasic.


Syntax

QBASIC [/B] [/EDCOM] [/QBHELP] [/EDITOR] [/G] [/H] [/MBF] [/NOHI] [[/RUN] [drive:][path]filename]


Parameters
drive: ( path filename v5.0 Win95 NT3.5)
Specifies the location and name of the file to load when QBasic starts.

Switches
/B (v5.0 Win95 NT3.5 ONLY)
Displays QBasic in black and white if you have a color monitor.
/EDCOM (v5.0 Win95)
UNDOCUMENTED: Used by EDIT.COM to start the editor. It MUST be typed in all capitals.
/EDITOR (v5.0 Win95 NT3.5 ONLY)
Invokes DOS Editor, a full-screen text editor.
/G (v5.0 Win95 NT3.5 ONLY)
Provides the fastest update of a CGA monitor.
/H (v5.0 Win95 NT3.5 ONLY)
Displays the maximum number of display lines possible on your screen.
/MBF (v5.0 Win95 NT3.5 ONLY)
Converts the built-in functions MKS$, MKD$, CVS, and CVD to MKSMBF$, MKDMBF$, CVSMBF, and CVDMBF, respectively.
/NOHI (v5.0 Win95 NT3.5 ONLY)
Allows the use of a monitor that does not support high-intensity video. Do not use this switch with Compaq laptop computers.
/QBHELP (v6.0)
UNDOCUMENTED: Used by HELP.COM to start the operating system help.
/RUN (v5.0 Win95 NT3.5)
Runs the specified Basic program before displaying it. You must specify a filename.

Related

GW-BASIC "gee whiz" basic interpreter.


Notes
Cannot use DOS Editor if DOS QBasic is not present

To use DOS Editor, you must have the QBASIC.EXE file in the current directory, or in the same directory as the EDIT.COM file in your search path. If you delete QBASIC.EXE to save space on your hard disk, you cannot use DOS Editor.


Running consecutive Basic programs

You can run consecutive Basic programs from a batch file by using the Basic SYSTEM statement and the QBASIC command with the /RUN switch. A SYSTEM statement quits QBASIC and returns control to the operating system after a Basic program has run, instead of returning to QBasic. This allows you to run more than one Basic program from a batch file without having to intervene.


Display of shortcut keys

Some monitors may not support the display of shortcut keys by default. If your monitor does not display shortcut keys, use the /B switch (for CGA monitors) and the /NOHI switch (for systems that do not support bold characters).


Examples

none.


Errorlevels

none.


Availability
External
DOS
v5.0 v5.0A v5.00.02 v5.001A v5.01 v5.02 v6.0 v6.10 v6.2 v6.21 v6.22 v6.23 v7.00 v7.0R1
Windows
Win95
Windows NT
NT3.5 NT4 NT2000