Search: in
QBasic
QBasic Encyclopedia
  Tutorials     Encyclopedia     Dictionary     Directory  
QBasic Email this to a friend      QBasic


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.[1] It can run under nearly all versions of DOS and Windows, or through DOSBox, on Linux and FreeBSD.[2] 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.

Like QuickBASIC, but unlike earlier versions of Microsoft BASIC, QBasic is a structured programming language, supporting constructs such as subroutines and while loops.[3][4] 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.[5][6]

Contents


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, 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, descended from OS/2 code, includes 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.[8] (Although, some localized versions of Windows 2000 and Windows XP still have it.)

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 its memory size. Until MS-DOS 7, MS-DOS Editor required QBasic. The "edit.com" program simply started QBasic in editor mode only.

Examples

QBasic came complete with four 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 2647, "MONEY MANAGER", a personal finance manager and "RemLine", a GW-BASIC code line number removing program.[1]

"Hello, World!"

Simple game

This program challenges the user to guess a randomly selected number within the 1-10 range, without offering the usual hints of "higher"/"lower":

Easter egg

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.[7] 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.77 MHz) or in an emulator like Bochs or DOSBox which can be slowed down.

References

See also

External links

bs:QBasic bg:QBasic ca:QBasic cs:QBasic de:QBasic es:QBASIC fr:QBasic ko:???? hr:QBasic it:QBASIC nl:QBasic no:QBasic pl:QBasic ru:QBasic sv:QBasic tl:QBasic tg:QBASIC zh:QBASIC





Source: Wikipedia | The above article is available under the GNU FDL. | Edit this article


Search for QBasic in Tutorials
Search for QBasic in Encyclopedia
Search for QBasic in Dictionary
Search for QBasic in Open Directory
Search for QBasic in Store
Search for QBasic in PriceGig


Help build the largest human-edited directory on the web.
Submit a Site - Open Directory Project - Become an Editor

Advertisement

Advertisement



QBasic
QBasic top QBasic

Home - Add TutorGig to Your Site - Disclaimer

©2008-2009 TutorGig.com. All Rights Reserved. Privacy Statement