GW-BASIC

related topics
{system, computer, user}
{math, number, function}
{album, band, music}
{company, market, business}

GW-BASIC was a dialect of the programming language BASIC developed by Microsoft from BASICA, originally for Compaq. It is compatible with Microsoft/IBM BASICA, but was disk based and did not need the ROM BASIC. It was bundled with MS-DOS operating systems on IBM PC compatibles by Microsoft. Microsoft also sold a BASIC compiler, BASCOM, compatible with GW-BASIC, for programs needing more speed. The language was suitable for simple games, business programs and the like. Since it was included with most versions of MS-DOS, it was also a low cost way for many would-be programmers to learn the fundamentals of computer programming.[1][2] With the release of MS-DOS 5.0, GW-BASIC's place was eventually taken by QBasic, a cut-down version of the separately available QuickBASIC compiler.[3]

Contents

Syntax

GW-BASIC has a command line-based integrated development environment (IDE) based on Dartmouth BASIC. It also includes function key shortcuts at the bottom of the screen. Like other early microcomputer versions of BASIC, GW-BASIC lacked many of the structures needed for structured programming such as local variables, and GW-BASIC programs executed relatively slowly, due to the fact that it was an interpreted programming language. All program lines must be numbered; all non-numbered lines are considered to be commands in direct mode to be executed immediately. Program source files are normally saved in binary compressed format with tokens replacing commands, with an option to save in ASCII text form.[4]

The GW-BASIC command-line environment has commands to RUN,LOAD,SAVE,LIST the current program, or quit to the operating SYSTEM; these commands can also be used as program statements. There is little support for structured programming in GW-BASIC. All IF/THEN/ELSE conditional statements must be written on one line, although WHILE/WEND statements may group multiple lines. Functions can only be defined using the single line DEF FNf(x)=<mathematical function of x> statement (e.g., DEF FNLOG(base,number)=LOG(number)/LOG(base)). The data type of variables can be specified with a character at the end of the variable name: A$ is a string of characters, A% is an integer, etc. Groups of variables can also be set to default types based on the initial letter of their name by use of the DEFINT, DEFSTR, etc., statements. The default type for undeclared variables not identified by such typing statements, is single-precision floating point.[5]

Full article ▸

related documents
Core dump
Mutual exclusion
System analysis
Visual DialogScript
Segmentation fault
Nautilus (file manager)
Pentium FDIV bug
LZ77 and LZ78
HTTP 404
Application binary interface
Abstract Window Toolkit
Allegro library
GTK+
Remote procedure call
Parasitic computing
QuickBASIC
Megabyte
Modifier key
Microsoft BASIC
Source Mage GNU/Linux
IBM 1620 Model II
Schematic
Macro virus (computing)
Video coding
ActiveX
Windows Metafile
Electrical network
ScriptBasic
Floating point unit
PureBasic