HOME

TheInfoList



OR:

QBasic is an integrated development environment (IDE) and interpreter for a variety of dialects of
BASIC BASIC (Beginners' All-purpose Symbolic Instruction Code) is a family of general-purpose, high-level programming languages designed for ease of use. The original version was created by John G. Kemeny and Thomas E. Kurtz at Dartmouth College ...
which are based on QuickBASIC. Code entered into the IDE is compiled to an intermediate representation (IR), and this IR is immediately executed on demand within the IDE. Like QuickBASIC, but unlike earlier versions of Microsoft BASIC, QBasic is a
structured programming Structured programming is a programming paradigm aimed at improving the clarity, quality, and development time of a computer program by making extensive use of the structured control flow constructs of selection ( if/then/else) and repetition ( ...
language, supporting constructs such as
subroutine In computer programming, a function or subroutine is a sequence of program instructions that performs a specific task, packaged as a unit. This unit can then be used in programs wherever that particular task should be performed. Functions may ...
s. Line numbers, a concept often associated with BASIC, are supported for compatibility, but are not considered good form, having been replaced by descriptive
line label In programming languages, a label is a sequence of characters that identifies a location within source code. In most languages, labels take the form of an identifier, often followed by a punctuation character (e.g., a colon). In many high-le ...
s. QBasic has limited support for user-defined data types ( structures), and several primitive types used to contain strings of text or numeric data. It supports various inbuilt functions. 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.


History

QBasic was intended as a replacement for GW-BASIC. It was based on the earlier QuickBASIC 4.5 compiler but without QuickBASIC's compiler and linker elements. Version 1.0 was shipped together with MS-DOS 5.0 and higher, as well as Windows 95,
Windows NT 3.x Windows NT 3.x may refer to either of, or all of the following versions of Microsoft Windows: * Windows NT 3.1 * Windows NT 3.5 Windows NT 3.5 is a major release of the Windows NT operating system developed by Microsoft and oriented towards bus ...
, and
Windows NT 4.0 Windows NT 4.0 is a major release of the Windows NT operating system developed by Microsoft and oriented towards businesses. It is the direct successor to Windows NT 3.51, which was released to manufacturing on July 31, 1996, and then to retail ...
. IBM recompiled QBasic and included it in PC DOS 5.x, as well as OS/2 2.0 onwards. eComStation and
ArcaOS ArcaOS is an operating system based on OS/2, developed and marketed by Arca Noae, LLC under license from IBM. It was codenamed Blue Lion during its development. It builds on OS/2 Warp 4.52 by adding support for new hardware, fixing defects and l ...
, descended from OS/2 code, include QBasic 1.0. QBasic 1.1 is included with MS-DOS 6.x, and, without EDIT, in Windows 95, Windows 98 and Windows Me. Starting with Windows 2000, Microsoft no longer includes QBasic with their operating systems, but still makes it available for use on newer versions of Windows.


Contents

QBasic (as well as the built-in
MS-DOS Editor __NOTOC__ MS-DOS Editor, commonly just called ''edit'' or ''edit.com'', is a TUI text editor that comes with MS-DOS 5.0 and later, as well as all "x86" SKUs of Windows, until Windows 11. It supersedes edlin, the standard editor in earlier versio ...
) is backwards-compatible with DOS releases prior to 5.0 (down to at least DOS 3.20). However, if used on any 8088/ 8086 computers, or on some 80286 computers, the QBasic program may run very slowly, or perhaps not at all, due to DOS memory size limits. Until
MS-DOS 7 MS-DOS 7 is a real mode operating system for IBM PC compatibles. Unlike earlier versions of MS-DOS it was not released separately by Microsoft, but included in the Windows 9x family of operating systems. Windows 95 RTM reports to be MS-DOS 7.0, ...
, MS-DOS Editor and
Help Help is a word meaning to give aid or signal distress. Help may refer to: Arts, entertainment, and media Films * ''Help'' (2010 film), a Bollywood horror film * ''Help'' (2021 theatrical film), a British psychological thriller film * '' ...
required QBasic: the EDIT.COM and HELP.COM programs simply started QBasic in editor and help mode only, and these can also be entered by running QBASIC.EXE with the /EDITOR and /QHELP switches (i.e., command lines QBASIC /EDITOR and QBASIC /QHELP). QBasic came complete with four pre-written example programs. These were '' Nibbles'', a variant of the Snake game; '' Gorillas'', an
artillery game Artillery games are two or three-player (usually turn-based) video games involving tanks (or simply cannons) trying to destroy each other. The core mechanics of the gameplay is almost always to aim at the opponent(s) following a ballistic trajec ...
; '' MONEY MANAGER'', a personal finance manager; and ''RemLine'', a Q-BASIC code line-number-removing program. QBasic has an Easter egg accessed by pressing and holding simultaneously after running QBasic at the DOS prompt but before the title screen loads: this lists ''The Team'' of programmers.


See also

* Microsoft Small Basic * QB64


References


External links


Runnable QBasic 1.1
via the Internet Archives
Download QBASIC 1.1 from the Internet Archive

QB Express: Qbasic and Freebasic programming magazine
* : created in 1997, one of the oldest QBasic sites on the web

an introduction {{Authority control BASIC interpreters Discontinued Microsoft BASICs DOS software Articles with example BASIC code 1991 software BASIC programming language family Microsoft programming languages Programming languages created in 1991