Science Fair Projects Ideas - GW-BASIC

All Science Fair Projects

      

Science Fair Project Encyclopedia for Schools!

  Search    Browse    Forum  Coach    Links    Editor    Help    Tell-a-Friend    Encyclopedia    Dictionary     

Science Fair Project Encyclopedia

For information on any area of science that interests you,
enter a keyword (eg. scientific method, molecule, cloud, carbohydrate etc.).
Or else, you can start by choosing any of the categories below.

GW-BASIC

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 PC 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.

Last updated: 10-09-2005 23:29:30
10-26-2009 08:16:03
The contents of this article is licensed from www.wikipedia.org under the GNU Free Documentation License. Click here to see the transparent copy and copyright details
Science kits, science lessons, science toys, maths toys, hobby kits, science games and books - these are some of many products that can help give your kid an edge in their science fair projects, and develop a tremendous interest in the study of science. When shopping for a science kit or other supplies, make sure that you carefully review the features and quality of the products. Compare prices by going to several online stores. Read product reviews online or refer to magazines.

Start by looking for your science kit review or science toy review. Compare prices but remember, Price $ is not everything. Quality does matter.
Science Fair Coach
What do science fair judges look out for?
ScienceHound
Science Fair Projects for students of all ages
All Science Fair Projects.com Site
All Science Fair Projects Homepage
Search | Browse | Links | From-our-Editor | Books | Help | Contact | Privacy | Disclaimer | Copyright Notice