Index: > A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Business Industries Finance Tax

Home > QBasic


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.

QBasic came complete with a couple of pre-written example games. These were Nibbles (a variant of the Snake game found on most Nokia cellphones) and Gorillas , an explosive-banana throwing game.

1 Syntax

Like QuickBASIC, but unlike earlier versions of Microsoft BASIC, QBasic was a structured programming language, supporting constructs such as named subroutines and while loopIn most computer programming languages, a while loop is a control structure that allows code to be executed repeatedly based on a given Boolean condition. The while construct consists of a block of code and a condition. The condition is first evaluated ifs. Line numberIn computing, a line number is a way of specifying a point in a file by enumerating each line in the file by a number. Line numbers are widely used for several purposes. In programming, if a programmer introduces a compile-time detectable bug into the pros, 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 ( structureA structure can be a building or other thing built, such as a bridge, but here the structure of a thing is how the parts of it relate to each other, how it is put together; how it works is process, but process requires a viable structure. Both reality ands), and several primitive types used to contain strings of text or numeric data.

2 Code Example (displays "Hello, World")

PRINT "Hello, World"

3 Special Keys

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.

4 External links




BASIC dialects Imperative programming languages Procedural programming languages Structured programming languages



Non User