Q Basic
   HOME

TheInfoList



OR:

QBasic is an
integrated development environment An integrated development environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of at least a source code editor, build automation tools a ...
(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 MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few ope ...
5.0 and higher, as well as
Windows 95 Windows 95 is a consumer-oriented operating system developed by Microsoft as part of its Windows 9x family of operating systems. The first operating system in the 9x family, it is the successor to Windows 3.1x, and was released to manufacturin ...
,
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 95 is a consumer-oriented operating system developed by Microsoft as part of its Windows 9x family of operating systems. The first operating system in the 9x family, it is the successor to Windows 3.1x, and was released to manufacturin ...
,
Windows 98 Windows 98 is a consumer-oriented operating system developed by Microsoft as part of its Windows 9x family of Microsoft Windows operating systems. The second operating system in the 9x line, it is the successor to Windows 95, and was released to ...
and Windows Me. Starting with
Windows 2000 Windows 2000 is a major release of the Windows NT operating system developed by Microsoft and oriented towards businesses. It was the direct successor to Windows NT 4.0, and was Software release life cycle#Release to manufacturing (RTM), releas ...
, 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 The 8086 (also called iAPX 86) is a 16-bit microprocessor chip designed by Intel between early 1976 and June 8, 1978, when it was released. The Intel 8088, released July 1, 1979, is a slightly modified chip with an external 8-bit data bus (allowi ...
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 Snakes are elongated, Limbless vertebrate, limbless, carnivore, carnivorous reptiles of the suborder Serpentes . Like all other Squamata, squamates, snakes are ectothermic, amniote vertebrates covered in overlapping Scale (zoology), scales. Ma ...
game; ''
Gorillas Gorillas are herbivorous, predominantly ground-dwelling great apes that inhabit the tropical forests of equatorial Africa. The genus ''Gorilla'' is divided into two species: the eastern gorilla and the western gorilla, and either four or fi ...
'', 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 Investment management is the professional asset management of various securities, including shareholdings, bonds, and other assets, such as real estate, to meet specified investment goals for the benefit of investors. Investors may be instituti ...
'', 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 Microsoft Small Basic is a programming language, interpreter and associated IDE. Microsoft's simplified variant of BASIC, it is designed to help students who have learnt visual programming languages such as Scratch learn text-based programming ...
*
QB64 QB64 (originally QB32) is a self-hosting BASIC compiler for Microsoft Windows, Linux and Mac OS X, designed to be compatible with Microsoft QBasic and QuickBASIC. QB64 is a C++ emitter, which is integrated with a C++ compiler to provide compi ...


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