QuickBASIC
From Wikipedia, the free encyclopedia
Developer: | Microsoft |
---|---|
OS: | MS-DOS |
Microsoft QuickBASIC (also QB or incorrectly, "QBasic", which is a different system) is a descendant of the BASIC programming language that was developed by the Microsoft Corporation for use with the MS-DOS and Mac OS operating system. It is loosely based on GW-BASIC but adds user-defined types, improved programming structures, better graphics and disk support and a compiler in addition to the interpreter. Microsoft marketed QuickBASIC as the introductory level for their BASIC Professional Development System.
Microsoft released the first version of QuickBASIC on August 18, 1985 stored on a single 5.25" floppy disk. Since version 2.0 QuickBASIC contained an Integrated Development Environment (IDE). Users could edit directly in its onscreen text editor.
Although still supported optionally in QuickBASIC line numbers were no longer needed. Program jumps did also work with named labels. Later versions also added control structures such as multiline conditional statements and loop blocks.
Microsoft's "PC BASIC Compiler" was included for compiling programs into DOS executables. The editor included an interpreter which allowed the programmer to run the program being edited without leaving the editor, as of version 4.0. The interpreter was used to debug a program before creating an executable file. Unfortunately there were some small, subtle differences between the interpreter and the compiler, so that sometimes a program that ran perfectly well in the interpreter would fail after compilation, or would even not compile at all.
The last version of QuickBASIC was version 4.5 (1988), although development of the Microsoft BASIC Professional Development System (PDS) continued until its last release of version 7.1 in October 1990 (at the same time, the QuickBASIC packaging was silently changed so that the disks use the same compression used for BASIC PDS 7.1.[1]. The Basic PDS 7.x version of the IDE was called QuickBASIC Extended (QBX), and it only ran on DOS, unlike the rest of Basic PDS 7.x, which also ran on OS/2. The successor to QuickBASIC and Basic PDS was Visual Basic for MS-DOS 1.0, provided in Standard and Professional versions. Later versions of Visual Basic did not include DOS versions, as Microsoft concentrated on Windows applications.
A subset of QuickBASIC 4.5, named QBasic, was included with MS-DOS 5 and later versions, replacing the GW-BASIC included with previous versions of MS-DOS. Compared to QuickBASIC, QBasic is limited to an interpreter only, lacks a few functions, can only handle programs of a limited size, and lacks support for separate program modules. Since it lacks a compiler, it cannot be used to produce executable files, although its program source code can still be compiled by a QuickBASIC 4.5, PDS 7.x or VBDOS 1.0 compiler, if available.
For more on the language, history and the community of QuickBASIC, and its free interpreter-only counterpart see the article QBasic. It includes a barebones tutorial for QuickBASIC/QBasic programming.
For the Mac OS Operating System QuickBASIC 1.00 was launched. It supports Macintosh with more than 1 MB RAM[2].
Contents |
[edit] Issues in Versions 4.0, 4.5, PDS, and VBDOS
While QuickBASIC was a useful language for rapid development, it had some definite limitations:
- 64 kB Dgroup limit for variable storage (this was a problem with all DOS and 16-bit OS/2 programs which had 64 kB segment limits). Programmers of large programs had to be careful not to overflow the 64 kB variable area. Part of this area (about 32K) was taken up with internal variables, so that only 32K was usable. The two most useful work arounds were to use a "STRING" file to store variables, loading the variable value only when required, and to use a separate file to declare variables. With Basic PDS 7.x, far strings can be used by using the /Fs option when compiling, and with VBDOS, far strings are always used. Dgroup overflow could cause the next problem to surface.
- Interpreted and compiled programs were not fully compatible. Because the interpreter was running p-code, it wasn't identical in execution to the compiled version of the same program. It was possible to have a program that would run interpreted in the IDE, which would not run in compiled form, and vice versa. Error statements for the two options were different, so that it was possible to have a program which would not run in either, and would report different errors. The QuickBasic 4.0, Basic PDS 6.0, and later version of the Basic compiler support CodeView symbols.
These issues have never been resolved by Microsoft. However, once a programmer was aware of these issues, QuickBASIC, Basic Professional Development System, and Visual Basic for DOS were eminently capable.
[edit] Current Uses
Despite its obsolescence, QuickBASIC is still being used to make homebrew DOS applications on DOSBox for handheld game consoles [1]. In addition, it continues to be used in some schools, usually as part of an introduction to programming, though is fast becoming replaced by more popular compilers.
[edit] Successors
Microsoft's Visual Basic was the successor of QuickBASIC. However its backwards compatibility is unsatisfactory, so several commercial compilers were developed including PowerBasic, and Xbasic, with varying degrees of compatibility. Several open source and/or freeware options exist or have existed, and one that shows very good compatibility with QuickBASIC is FreeBASIC. As the name suggests FreeBASIC is a completely free, open-source, 32-bit BASIC compiler, with the syntax the most compatible possible with MS-QuickBASIC, that adds new features such as pointers, unsigned data types, inline-assembly and many others. The FreeBASIC project is hosted by Sourceforge.
[edit] See also
[edit] Sources
- ^ http://support.microsoft.com/kb/65291 Microsoft Knowledge Base article 65291
- ^ http://support.microsoft.com/kb/31937 System requirments QuickBASIC for Macintosh
[edit] External links
- Pete's QB Site. One of the oldest remaining QB sites (since Oct 1998). Home of the monthly QB Express magazine and oriented towards game programmers, and now releases FreeBASIC news on the site and the magazine as well.
- QQN: QBasic/QuickBASIC News.
- QQN's Newbies Section which includes a link for downloading QBasic.
- Qbasic central: Houses an impressive platform game coded in QuickBASIC
- FreeBASIC compiler. A multi-platform BASIC compiler backwards-compatible with QuickBASIC source and adding new features.
- The QuickBasic Planet QBasic forum frequent NEWKs QBasic website.
- DOSBox demo project - an article on how QuickBASIC is now being used to write programs to promote compatibility between IBM PC Compatibles and the GP2X.