QBASIC


'QBasic' is an IDE and interpreter for a variant of the BASIC programming language which is based on QuickBasic. Code entered into the IDE is compiled to an intermediate form, and this intermediate form is immediately interpreted on demand within the IDE.

Contents
Syntax
History
CLS
PRINT "Hello, World!"
END
See also
External Links

Syntax


Like QuickBASIC, but unlike earlier versions of Microsoft BASIC, QBasic is a structured programming language, supporting constructs such as named subroutines and while loops. Line numbers, a concept often associated with BASIC, are supported for compatibility, but are 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.

History


QBasic was intended as a replacement for GW-BASIC, 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. Until MS-DOS 7, the MS-DOS editor required QBasic. The "edit.com" program simply started QBasic in editor mode only.
Although QBasic (along with the built-in MS-DOS Editor) was first introduced as part of the MS-DOS 5.0 Package, it did not depend specifically on MS-DOS 5.0 to run. QBASIC (and the Editor) could be used with previous versions of DOS, down to at least version 3.20. However, sufficient memory and a reasonably fast CPU were still needed, otherwise the program would run very slowly.
For its time, QBasic provided a state-of-the-art IDE, including a debugger with features such as on-the-fly expression evaluation and code modification that were still relatively unusual more than ten years later.
QBasic is able to be run natively under nearly all versions of DOS and of Windows, and by using the free DOSBox emulator, it can run on platforms such as Linux and FreeBSD.
QBasic came complete with a couple of pre-written example programs. These were Nibbles (a variant of the Snake game), Gorillas, an explosive-banana throwing game derived from Artillery Game first produced on the Tektronix 4051 and later HP 2640 HP 2647 and RemLine, a GW-BASIC code line number removing program.
=="Hello, World!" example.==
"Hello, World!"

CLS
PRINT "Hello, World!"
END

Trivia


QBasic has a little known easter egg. To see it, press and hold ''LeftCtrl+LeftShift+LeftAlt'' and ''RightCtrl+RightShift+RightAlt'' simultaneously after running QBasic at the DOS prompt but before the title screen loads: this lists ''The Team'' of programmers. Note that on modern computers, it is much too fast to perform. It is best done on an old PC (preferably one with a working Turbo button, with the switch on to slow the CPU to 4.77MHz) or in an emulator like Bochs or DOSBox which can be slowed down.

See also



FreeBASIC

True Basic

Visual Basic

PowerBASIC

External Links



Download QBASIC 1.1 from Microsoft

Download Roy Mathur's QBASIC Shell

This article provided by Wikipedia. To edit the contents of this article, click here for original source.

psst.. try this: add to faves