FACTOID # 72: There are 22 countries where more than half the population is illiterate. Fifteen of them are in Africa.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
 
 
WHAT'S NEW
RELATED ARTICLES
People who viewed "GWBASIC" also viewed:
RECENT ARTICLES
More Recent Articles »
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > GWBASIC

GW-BASIC (named after Greg Whitten, an early Microsoft employee and is known more affectionately as 'gee-whiz') was a dialect of BASIC developed by Microsoft, originally for Compaq.


It is compatible with Microsoft/IBM BASICA, but was disk based and did not require the resources of the ROM included on IBM's machines. It was bundled with MS-DOS operating systems on IBM PC compatibles by Microsoft. 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. It did have a large number of graphics commands.


Still, it had enough flexibility to allow one to write simple games, business programs and the like. Since it was available on any PC, it was also a cheap way for would-be programmers to learn the rudiments of computer programming. It also provided a way to develop impressive science fair projects for aspiring students willing to deal with the frustrations of programming in such a spartan system.


GW-BASIC has a command line-based Integrated Development Environment (IDE) system based on the original introduced at Dartmouth College; all program lines must be numbered, all non-numbered lines are considered to be commands in direct mode (ie, to be executed immediately). The user interface is almost completely command line, except for the function key shortcuts at the bottom and an initial copyright notice at the top of the screen. Files are normally saved in a GW-BASIC binary compressed format with tokens replacing commands; however, it has an option to save programs in ASCII text form.


The GW-BASIC IDE has commands to RUN,LOAD,SAVE,LIST the current program, or quit to the operating SYSTEM. Although they may all be used as program statements such use is rare for all commands except SYSTEM.


There is little support for structured programming in GW-BASIC and therefore it is very much up to GW-BASIC programmers, themselves, to provide a good structure for their programs. 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)). Variables are often typed via a type symbol at the end of their name: A$ is a string, A% is an integer, etc. Groups of undeclared 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.


Because many GW-BASIC programmers were without formal training, they often failed to see the need for simple structuring and as a result made extensive, undisciplined use of GOTOs rather than using them as replacements for the missing structural statements. See spaghetti code.



GW-BASIC allowed for the joysticks and pen-input devices of its time, but not for mice. (It is possible to use pen-input commands for mice, but the reliability of the mouse responding properly to pen requests is poor.) GW-BASIC can read from and write to files, LPT ports, and COM ports; it can also do event trapping for ports. It cannot handle tape devices. It is able to play simple sheet music using the PLAY statement, requiring a string of notes (e.g. PLAY "edcdeee2dfedc4"), or the SOUND statement, requiring a frequency in Hertz and a length in clock ticks for the standard internal 'speaker' in IBM machines, consequently sound is limited to single channel beeps and whistles as befits a 'business' machine.


GW-BASIC's place in the MS-DOS distribution was eventually taken by Microsoft QBASIC, a cut-down version of the separately available Microsoft QuickBASIC compiler. GW-BASIC's main advantage over BASICA was that it did not require a BASIC interpreter on the ROM and so could be used on non-IBM PCs.


  Results from FactBites:
 
Computing.Net - gwbasic memory (277 words)
I have an old gwbasic prog I wrote 20 yrs ago for a fundraiser for a local orchestra, where I keep track of 2000 coupons & 200 sellers.
It is not the computer hardware, it is GWBASIC limited.
Actually, with gwbasic the limit of all DIM data statements is 64K bytes.
GWBASIC TUTOR TEXT (4541 words)
GWBASIC is a programming language with which we can write application programs.
Note that we have not given any line numbers and that the statement is executed as soon as you pressed enter key after typing in the command.
An ENTER at the end of statement tells GWBASIC to write the statement into memory and hence is a must.
  More results at FactBites »


 
 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms, 1022, m