QBasic: Difference between revisions

From HandWiki
imported>LinXED
change
 
url
 
Line 1: Line 1:
{{Short description|IDE for the BASIC programming language}}
'''QBasic''' is an [[Integrated development environment|integrated development environment]] (IDE) and [[Software:BASIC interpreter|interpreter]] for a variety of dialects of [[BASIC]] which are based on the [[Software:QuickBASIC|QuickBASIC]] compiler and the [[Learn BASIC Now#QuickBASIC Interpreter|QuickBASIC Interpreter]]. Code entered into the IDE is an [[Intermediate representation|intermediate representation]] (IR), and this IR is immediately executed on demand within the IDE.<ref name="GBvsQB" />
{{Infobox programming language
 
| screenshot            = frameless
Like [[Software:QuickBASIC|QuickBASIC]], but unlike the earlier versions of [[Microsoft BASIC|MBASIC]] and [[GW-BASIC|GWBASIC]], QBasic is a [[Structured programming|structured programming]] language, supporting constructs such as [[Subroutine|subroutine]]s.<ref name="subroutines"/> [[Line number]]s, a concept often associated with BASIC, are supported for compatibility but are not considered good form, having been replaced by descriptive line labels.<ref name="GBvsQB"/> QBasic has limited support for user-defined data types ([[Record (computer science)|structures]]), and several primitive types used to contain strings of text or numeric data.<ref name="types"/><ref name="limits"/> It supports various inbuilt functions.
| paradigm              = [[Procedural programming|Procedural]]
 
| year                  = {{Start date and age|1991}}
For its time, QBasic provided a state-of-the-art IDE, including a [[Debugger|debugger]] with features such as on-the-fly expression evaluation and modifications in code
| designer              =
 
| developer              = [[Company:Microsoft|Microsoft]]
== History ==
| latest_release_version =
QBasic 2000-1991, was intended as a replacement for [[GW-BASIC|GWBASIC]] 1989-1983. QBasic was a subset of the ever popular QuickBASIC 4.5 1988 $99 compiler, targeted for the hobbyists and home users; QuickBASIC 4.5 in turn was a subset of the [[Software:QuickBASIC|BASIC Professional Development System]] 7.1 1990 $495.
| latest_release_date    =
 
| typing                = Static, strong
====== QBasic Ancestry ======
| implementations        =
In 1988, soon after the release of QuickBASIC 4.5, Microsoft Press published ''[[Learn BASIC Now]]'' in 1989 $39.95 and included the [[Learn BASIC Now#QuickBASIC Interpreter|QuickBASIC Interpreter]] 1.0 1989.<ref name="Code Nation" /> QBI.exe was based on QuickBASIC 4.5's QB.exe but without the ability to create executable files on disk; lacked handling interrupts, signals, sleep, events; limited the user's program + data to 160K only; included the QuickBASIC Advisor (three help files); as well as the QB Express—Computer Based Training (LEARN).<ref name="Learn BASIC Now" />
| dialects              =
 
| influenced_by          = [[Software:QuickBASIC|QuickBASIC]], [[GW-BASIC]]
[[Learn BASIC Now#QuickBASIC Interpreter|QuickBASIC Interpreter]] 1.0 1989 became the basis for the QBasic interpreter 1.0 1991—both supported the same IDE menus, the same language syntax, and the same execution limits.  However, QBasic had a condensed Advisor (single help file) only and lacked the QB Express (LEARN).
| influenced            = [[FreeBASIC]], [[QB64]], SmallBasic
| current version        =
| operating_system      = [[Software:MS-DOS|MS-DOS]], [[Software:Windows 95|Windows 95]], [[Software:Windows 98|Windows 98]], [[Software:Windows Me|Windows Me]], [[Software:PC DOS|PC DOS]], OS/2, [[Software:EComStation|eComStation]], [[Software:ArcaOS|ArcaOS]]
| license                = [[Proprietary software|Proprietary]]
| website                =
| status                = Historic
}}


'''QBasic''' is an [[Integrated development environment|integrated development environment]] (IDE) and [[Software:BASIC interpreter|interpreter]] for a variety of dialects of [[BASIC]] which are based on [[Software:QuickBASIC|QuickBASIC]]. Code entered into the IDE is compiled to an [[Intermediate representation|intermediate representation]] (IR), and this IR is immediately executed on demand within the IDE.<ref name="GBvsQB" />
[[File:QBI Opening Screen.png|thumb|QuickBASIC Interpreter 1.0 Opening Screen|none]]


Like QuickBASIC, but unlike earlier versions of Microsoft BASIC, QBasic is a [[Structured programming|structured programming]] language, supporting constructs such as [[Subroutine|subroutine]]s.<ref name="subroutines"/> [[Line number]]s, a concept often associated with BASIC, are supported for compatibility, but are not considered good form, having been replaced by descriptive line labels.<ref name="GBvsQB"/> QBasic has limited support for user-defined data types ([[Record (computer science)|structures]]), and several primitive types used to contain strings of text or numeric data.<ref name="types"/><ref name="limits"/> It supports various inbuilt functions.
====== QBasic Family Pedigree ======
QBasic 1.0 1991 ← [[Learn BASIC Now#QuickBASIC Interpreter|QuickBASIC Interpreter]] 1.0 1989 ← [[Software:QuickBASIC|QuickBASIC]] 4.5 1988


For its time, QBasic provided a state-of-the-art IDE, including a [[Debugger|debugger]] with features such as on-the-fly expression evaluation and code modification.{{Citation needed|date=October 2021}}
====== QBasic Versions ======
QBasic version 1.0 was shipped together with [[Software:MS-DOS|MS-DOS]] 5.0x, as well as [[Software:Windows NT 3.1|Windows NT 3.x]], and [[Software:Windows NT 4.0|Windows NT 4.0]]. [[Company:IBM|IBM]] recompiled QBasic and included it in [[Software:PC DOS|PC DOS]] 5.x, as well as OS/2 2.0 onwards.<ref name="name" /> [[Software:EComStation|eComStation]] and [[Software:ArcaOS|ArcaOS]], descendants of the OS/2 source code, also included QBasic 1.0.


== History ==
QBasic 1.1 was included with MS-DOS 6.x, and, without <code>EDIT</code>, in [[Software:Windows 95|Windows 95]], [[Software:Windows 98|Windows 98]] and [[Software:Windows Me|Windows Me]]. Starting with [[Software:Windows 2000|Windows 2000]], Microsoft no longer included QBasic or any BASIC with their operating systems.<ref name="Windows 2000" />
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 [[Software:MS-DOS|MS-DOS]] 5.0 and higher, as well as [[Software:Windows 95|Windows 95]], [[Software:Windows NT 3.1|Windows NT 3.x]], and [[Software:Windows NT 4.0|Windows NT 4.0]]. [[Company:IBM|IBM]] recompiled QBasic and included it in [[Software:PC DOS|PC DOS]] 5.x, as well as OS/2 2.0 onwards.<ref name="name"/> [[Software:EComStation|eComStation]] and [[Software:ArcaOS|ArcaOS]], descended from OS/2 code, include QBasic 1.0. QBasic 1.1 is included with MS-DOS 6.x, and, without <code>EDIT</code>, in [[Software:Windows 95|Windows 95]], [[Software:Windows 98|Windows 98]] and [[Software:Windows Me|Windows Me]]. Starting with [[Software:Windows 2000|Windows 2000]], Microsoft no longer includes QBasic with their operating systems.<ref name="Windows 2000"/>


== Contents ==
== Contents ==
QBasic (as well as the built-in [[Software:MS-DOS Editor|MS-DOS Editor]]) is backwards-compatible with DOS releases prior to 5.0 (down to at least DOS 3.20). However, if used on any [[Engineering:Intel 8088|8088]]/[[Engineering:Intel 8086|8086]] computers, or on some [[Engineering:Intel 80286|80286]] computers, the QBasic program may run very slowly, or perhaps not at all, due to DOS memory size limits. Until [[Software:MS-DOS 7|MS-DOS 7]], MS-DOS Editor and [[Software:Help (command)|Help]] required QBasic: the <code>EDIT.COM</code> and <code>HELP.COM</code> programs simply started QBasic in editor and help mode only, and these can also be entered by running <code>QBASIC.EXE</code> with the <code>/EDITOR</code> and <code>/QHELP</code> switches (i.e., command lines <code>QBASIC /EDITOR</code> and <code>QBASIC /QHELP</code>).
QBasic (as well as the built-in [[Software:MS-DOS Editor|MS-DOS Editor]]) is backward-compatible with DOS releases prior to 5.0 (down to at least DOS 3.20). However, if used on any [[Engineering:Intel 8088|8088]]/[[Engineering:Intel 8086|8086]] computers, or on some [[Engineering:Intel 80286|80286]] computers, the QBasic program may run very slowly, or perhaps not at all, due to DOS memory size limits. Until [[Software:MS-DOS 7|MS-DOS 7]], MS-DOS Editor and [[Software:Help (command)|Help]] required QBasic: the <code>EDIT.COM</code> and <code>HELP.COM</code> programs simply started QBasic in editor-and-help mode only, and these can also be entered by running <code>QBASIC.EXE</code> with the <code>/EDITOR</code> and <code>/QHELP</code> switches (i.e., command lines <code>QBASIC /EDITOR</code> and <code>QBASIC /QHELP</code>).


QBasic came complete with four pre-written example programs. These were ''Nibbles'', a variant of the Snake game; ''Gorillas'', an artillery game; ''[[Software:Microsoft Money|MONEY MANAGER]]'', a personal finance manager; and ''RemLine'', a Q-BASIC code line-number-removing program.<ref name="GBvsQB"/>
QBasic came complete with four pre-written example programs. These were ''Nibbles'', a variant of the [[Software:Snake (video game genre)|Snake]] game; ''Gorillas'', an artillery game; ''[[Software:Microsoft Money|MONEY MANAGER]]'', a personal finance manager; and ''RemLine'', a Q-BASIC code line-number-removing program.<ref name="GBvsQB"/>


QBasic has an [[Easter egg (media)|Easter egg]] accessed by pressing and holding {{keypress|Left CTRL|Left SHIFT|Left ALT|Right CTRL|Right SHIFT|Right ALT}} simultaneously after running QBasic at the DOS prompt but before the title screen loads: this lists ''The Team'' of programmers.<ref name="eeggs"/>
QBasic has an [[Easter egg (media)|Easter egg]] accessed by pressing and holding {{keypress|Left CTRL|Left SHIFT|Left ALT|Right CTRL|Right SHIFT|Right ALT}} simultaneously after running QBasic at the DOS prompt but before the title screen loads: this lists ''The Team'' of programmers.<ref name="eeggs"/>


== See also ==
[[File:QBasic Easter Egg (LShift+LCtrl+LAtl+RShift+RCtrl+RAtl).png|thumb|QBasic 1.0 and 1.1 Easter Egg - The Team|none]]


* [[Microsoft Small Basic]]
==See also==
* [[QB64]]
* {{annotated link|Learn BASIC Now}}
* {{annotated link|QB64}}
* {{annotated link|Microsoft Small Basic}}


== References ==
== References ==
Line 48: Line 44:
<ref name="types">{{cite web|url=http://www.qbasicnews.com/qboho/qcktype.shtml|title=QBASIC Manual: TYPE Statement QuickSCREEN|access-date=2008-06-28|archive-url=https://web.archive.org/web/20170324214553/http://www.qbasicnews.com/qboho/qcktype.shtml|archive-date=2017-03-24|url-status=dead}}</ref>
<ref name="types">{{cite web|url=http://www.qbasicnews.com/qboho/qcktype.shtml|title=QBASIC Manual: TYPE Statement QuickSCREEN|access-date=2008-06-28|archive-url=https://web.archive.org/web/20170324214553/http://www.qbasicnews.com/qboho/qcktype.shtml|archive-date=2017-03-24|url-status=dead}}</ref>
<ref name="limits">{{cite web|url=http://www.qbasicnews.com/qboho/qckadvr@l8207.shtml|title=QBASIC Manual: Limits - Names, Strings, and Numbers|access-date=2008-06-28|archive-url=https://web.archive.org/web/20160304074659/http://www.qbasicnews.com/qboho/qckadvr@l8207.shtml|archive-date=2016-03-04|url-status=dead}}</ref>
<ref name="limits">{{cite web|url=http://www.qbasicnews.com/qboho/qckadvr@l8207.shtml|title=QBASIC Manual: Limits - Names, Strings, and Numbers|access-date=2008-06-28|archive-url=https://web.archive.org/web/20160304074659/http://www.qbasicnews.com/qboho/qckadvr@l8207.shtml|archive-date=2016-03-04|url-status=dead}}</ref>
<ref name="Code Nation">{{cite book |last1=Halvorson |first1=Michael J. |title=Code Nation: Personal Computing and the Learn to Program Movement in America |date=2020 |publisher=ACM Books |location=New York, NY |pages=145-153}}</ref>
<ref name="Learn BASIC Now">{{cite web|url=https://archive.org/details/learnbasicnow0000halv|title=''Learn BASIC Now'' by Michael Halvorson and David Rygmyr|date=1989-11-23}}</ref>
<ref name="name">{{cite web|url=http://www.emsps.com/oldtools/msbasv.htm#qbasic|title=Microsoft BASIC version information|access-date=2008-06-12}}</ref>
<ref name="name">{{cite web|url=http://www.emsps.com/oldtools/msbasv.htm#qbasic|title=Microsoft BASIC version information|access-date=2008-06-12}}</ref>
<ref name="Windows 2000">{{cite web|url=http://support.microsoft.com/kb/258265|title=QBasic Missing from Windows 2000|date=2007-03-01|access-date=2008-06-12}}</ref>
<ref name="Windows 2000">{{cite web|url=http://support.microsoft.com/kb/258265|title=QBasic Missing from Windows 2000|date=2007-03-01|access-date=2008-06-12|archive-url=https://web.archive.org/web/20101116013923/http://support.microsoft.com/kb/258265|archive-date=2010-11-16|url-status=dead}}</ref>
<ref name="eeggs">{{cite web|url=http://www.eeggs.com/items/817.html|title=QBasic - Developer Credits|date=1999-07-23|access-date=2008-06-12}}</ref>
<ref name="eeggs">{{cite web|url=http://www.eeggs.com/items/817.html|title=QBasic - Developer Credits|date=1999-07-23|access-date=2008-06-12}}</ref>
}}
}}


== External links ==
== External links ==
{{Wikibooks}}


* [https://archive.org/details/msdos_qbasic_megapack Runnable QBasic 1.1] via the Internet Archives
* [https://archive.org/details/msdos_qbasic_megapack Runnable QBasic 1.1] via the Internet Archives
* [https://web.archive.org/web/20120215074213/http://download.microsoft.com/download/win95upg/tool_s/1.0/w95/en-us/olddos.exe Download QBASIC 1.1 from the Internet Archive]
* [https://web.archive.org/web/20120215074213/http://download.microsoft.com/download/win95upg/tool_s/1.0/w95/en-us/olddos.exe Download QBASIC 1.1] via the Internet Achives
* [http://www.petesqbsite.com/sections/express/express.shtml QB Express: Qbasic and Freebasic programming magazine]
* [http://www.petesqbsite.com/sections/express/express.shtml QB Express: Qbasic and Freebasic programming magazine]
* {{citation|url=http://www.qbasicstation.com|title=The QBasic Station|archive-url=https://web.archive.org/web/20040604200851/http://www.qbasicstation.com/|archive-date=2004-06-04|author=Jack Thomson}}: created in 1997, one of the oldest QBasic sites on the web
* {{citation|url=http://www.qbasicstation.com|title=The QBasic Station|archive-url=https://web.archive.org/web/20040604200851/http://www.qbasicstation.com/|archive-date=2004-06-04|author=Jack Thomson}}: created in 1997, one of the oldest QBasic sites on the web
* [https://chortle.ccsu.edu/QBasic/index.html Programmed Lessons in QBasic]: an introduction
* [https://chortle.ccsu.edu/QBasic/index.html Programmed Lessons in QBasic]: an introduction
* [https://archive.org/details/microsoft-learn-basic-now Download QuickBASIC Interpreter 1.0] via the Internet Archives, included with ''Learn BASIC Now''


{{BASIC}}
{{BASIC}}

Latest revision as of 09:24, 22 May 2026

QBasic is an integrated development environment (IDE) and interpreter for a variety of dialects of BASIC which are based on the QuickBASIC compiler and the QuickBASIC Interpreter. Code entered into the IDE is an intermediate representation (IR), and this IR is immediately executed on demand within the IDE.[1]

Like QuickBASIC, but unlike the earlier versions of MBASIC and GWBASIC, QBasic is a structured programming language, supporting constructs such as subroutines.[2] 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.[1] QBasic has limited support for user-defined data types (structures), and several primitive types used to contain strings of text or numeric data.[3][4] 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 modifications in code

History

QBasic 2000-1991, was intended as a replacement for GWBASIC 1989-1983. QBasic was a subset of the ever popular QuickBASIC 4.5 1988 $99 compiler, targeted for the hobbyists and home users; QuickBASIC 4.5 in turn was a subset of the BASIC Professional Development System 7.1 1990 $495.

QBasic Ancestry

In 1988, soon after the release of QuickBASIC 4.5, Microsoft Press published Learn BASIC Now in 1989 $39.95 and included the QuickBASIC Interpreter 1.0 1989.[5] QBI.exe was based on QuickBASIC 4.5's QB.exe but without the ability to create executable files on disk; lacked handling interrupts, signals, sleep, events; limited the user's program + data to 160K only; included the QuickBASIC Advisor (three help files); as well as the QB Express—Computer Based Training (LEARN).[6]

QuickBASIC Interpreter 1.0 1989 became the basis for the QBasic interpreter 1.0 1991—both supported the same IDE menus, the same language syntax, and the same execution limits. However, QBasic had a condensed Advisor (single help file) only and lacked the QB Express (LEARN).

QuickBASIC Interpreter 1.0 Opening Screen
QBasic Family Pedigree

QBasic 1.0 1991 ← QuickBASIC Interpreter 1.0 1989 ← QuickBASIC 4.5 1988

QBasic Versions

QBasic version 1.0 was shipped together with MS-DOS 5.0x, as well as Windows NT 3.x, and Windows NT 4.0. IBM recompiled QBasic and included it in PC DOS 5.x, as well as OS/2 2.0 onwards.[7] eComStation and ArcaOS, descendants of the OS/2 source code, also included QBasic 1.0.

QBasic 1.1 was included with MS-DOS 6.x, and, without EDIT, in Windows 95, Windows 98 and Windows Me. Starting with Windows 2000, Microsoft no longer included QBasic or any BASIC with their operating systems.[8]

Contents

QBasic (as well as the built-in MS-DOS Editor) is backward-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 Editor and Help 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; MONEY MANAGER, a personal finance manager; and RemLine, a Q-BASIC code line-number-removing program.[1]

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.[9]

QBasic 1.0 and 1.1 Easter Egg - The Team

See also

References