Science Fair Project Encyclopedia
QBasic (an acronym for Quick Beginner's All-purpose Symbolic Instruction Code) is a variant of the BASIC programming language. It is not capable of compiling standalone executables. The source code is compiled to an intermediate form within the integrated development environment (IDE), and this intermediate form is immediately interpreted on demand within the IDE. It was intended as a replacement for GWBASIC, and was shipped together with MS-DOS 5.0 and higher, including Windows 95. QBasic was based on the earlier QuickBASIC 4.5 compiler but without QuickBASIC's compiler and linker elements.
Microsoft stopped shipping QBasic with later versions of Windows. Windows 98 users, however, will find it in the \TOOLS\OLDMSDOS directory of the CD-ROM; on the Windows 95 CD-ROM, it is in the \OTHER\OLDMSDOS directory. It is now only available from Microsoft's website for licensed users of MS-DOS. QBasic provided a state-of-the-art IDE (for its time), including a debugger with features such as on-the-fly expression evaluation and code modification that were still relatively unusual in 2003, more than ten years later.
QBasic was also the subject of several programming books for beginners.
Like QuickBASIC, but unlike earlier versions of Microsoft BASIC, QBasic was a structured programming language, supporting constructs such as named subroutines and while loops. Line numbers, a concept often associated with BASIC, were supported for compatibility, but were not necessary and not considered good form, having been replaced by descriptive line labels. QBasic has limited support for user-defined data types (structures), and several primitive types used to contain strings of text or numeric data.
Code Example (displays "Hello, World" and makes weird sounds)
PRINT "Hello, World" FOR Note = 450 TO 750 STEP 20 SOUND Note, 1 SOUND 800 - Note, 1 NEXT Note FOR Note = 750 TO 450 STEP -20 SOUND Note, 1 SOUND 750 + Note, 1 NEXT Note FOR Note = 100 TO 1000 STEP 20 SOUND Note, 1 SOUND 750 + Note, 1 NEXT Note END
Press Ctrl+Break to break a running program.
Press F5 to continue a program whose execution was broken.
Press Shift+F5 to restart a program back from the beginning.
Press F4 while program execution is broken to view the run-time screen, then press F4 again to switch back to the code screen.
Press F1 for help.
- Neobasic: An excellent qbasic site with a superb forum.
- QQN: QBasic/QuickBasic News.
- QQN's Newbies Section which includes a link for downloading QBasic.
- QBasic New Zealand: Some great downloads (many with source code), a forum.
- Alipha's site: Inactive site but quite a few useful downloads and articles.
- Another good QBasic page
- QBASIC news forum: One of the most active forums on QB around
- Pete's QB Site: Back from a four year period of inactivity, and now home to the new QB:Express magazine
- QBasic.com: Perhaps the best-known QBasic Web site, was frozen in 2000 and hence is now inactive.
The contents of this article is licensed from www.wikipedia.org under the GNU Free Documentation License. Click here to see the transparent copy and copyright details