What DOS switches are available when running QBASIC?
QBASIC has several DOS switches that will adjust how your QBASIC programming environment will operate. These are activated by typing "QBASIC" in DOS followed by the appropriate switch. (If you are running QB from within Windows, you will first have to navigate to the same directory as QBASIC before operating these switches.)|
The following switches are available and built into QB:
QBASIC [/B] [/EDITOR] [/G] [/H] [/MBF] [/NOHI] [[/RUN] [drive:][path]filename]
And here's what they mean:
|/B||Allows use of a monochrome monitor with a color graphics card.|
|/EDITOR||Starts the MS-DOS Text Editor. (You can use QBASIC to edit standard ASCII text files.)|
|/G||Provides the fastest update of a CGA screen.|
|/H||Displays the maximum number of lines possible for your hardware.|
|/MBF||Converts the built-in functions MKS$, MKD$, CVS, and CVD to MKSMBF$, MKDMBF$, CVSMBF, and CVDMBF, respectively.|
|/NOHI||Allows the use of a monitor without high-intensity support.|
|/RUN||Runs the specified Basic program before displaying it.|
[[drive:][path]filename] Specifies the program file to load or run.
The most useful of these commands is the last one in the table, /RUN. This allows you to automatically start running your program as soon as QBASIC loads, without having to go through the QBASIC IDE first. Also, if you create a *.BAT file containing the /RUN command, you can automatically run your program without having to type the command each time. With this trick, you can achieve the illusion of a compiled program.
Submitted by: Pete on June 24, 2004
Return to the FAQ