An Alphabet of Computer Languages: BASIC

Gary L. Ratliff Sr. <eronstuc@gmail.com>

When people first purchased their new computers in the early years of personal computers, one of the things they could be most sure of was that the computer would come with the Basic language installed. The Commodore PET came with a version from Microsoft as did the Apple and the TRS 80. However, each computer sported a slightly different version of the language. There were so many dialects of Basic that soon David A. Lien wrote A Handbook of Basic which defined all the keywords for the many dialects.

The repositories for PCLINUXOS have three separate versions of Basic which this article will discuss: REALbasic, Basic256, and Gambas. Each of these may be obtained by using the Synaptic Package Manager. One opens the program and locates these items by doing a search for "basic." The list is so long because any package which has "basic" in its description will be included in the search results.

REALbasic

The use of this language was the subject of my article in the February 2008 issue of this magazine. You may find the article from this link:

http://pclosmag.com/html/Issues/200802/page05.html

I mentioned that the language is being actively developed and that there is a new release every three months. For this reason, one may wish to obtain the language from the Real Software site itself. The instructions for obtaining, installing and using the product are in the article and will not be repeated. This is a wonderful product and it seems to be free for the Linux community. The programs developed for my Windows system only worked for a period of 30 days. However, the programs developed for the Linux system are still functional. Also, there is video support for speeding your learning process with this system.

BASIC256

This program was originally named Kidbasic and was inspired after the creator read the article "Why Johnny can't code." This article remarks that while the older generation grew up with a computer which came with Basic installed, this is not currently true. This language was developed so that one may teach children how to program using a simple line-oriented language.

To install it to your system just open the Synaptic Package Manager and give the root password. Search for "Basic" as previously mentioned. Find the file named basic256 from the list offered and mark it for installation. Note that this will also install several other programs which the system depends upon to function. Your results will most likely vary but my system installed a total of 11 packages to get a working basic256 system.

To open your new system, go to the menu and select: More Applications -> Development ->Development Environments -> BASIC256. You will be presented with a new program IDE. In the text window you will type in the familiar Basic commands and when the Run command is clicked your program will execute in either the text or graphics display area. If instead of clicking the run command you select debug, then an item allowing you to step through the program one line at a time will be offered.

Once you have the system installed, you are ready to learn to use your new system. By clicking the About menu item you will learn that you may find tutorials and documentation for the system at:

http://kidbasic.sourceforge.net/

The website will contain menus for the tutorials, the documentation, and an article which shows how the Basic computer language is still useful for teaching new computer users, specifically children, about the functions of a computer. In the documentation section you will receive a list of the correct syntax for using all the commands of the language. As this material is only seven printed pages it might be best to just make a printed handbook of this information. That way it is available for use as you begin to create example programs to run.

You will notice that this system is free under the GPL. It is also available in a version for Windows. This comes as a zipped file and should be extracted to its own directory. Then one gets it to run issuing a basic256.exe command.

pics

Here is the development screen for BASIC256. The text of the Basic program is entered into the Window. Any text output will appear in the Text Window, while commands which produce graphical output will appear in the Graphics Window.

The Run arrow will run the entire program. The Debug item will allow the program to be run one step at a time.

GAMBAS (Gambas Almost Means Basic)

The repositories for PCLINUXOS have two separate sets of Gambas programs. There is a set for the first version of Gambas and another set for Gambas2. I installed the Gambas2 set on one of my computers, Eronstuc, and the original version of Gambas was installed on another machine, Gabriel. Because either version has a tremendous set of dependencies which must be satisfied, use the Synaptic Package Manager for your install of either system.

Once you call upon the package manager you will be asked for the root password. Now do a search for "Gambas." You will note that a tremendous number of applications will appear. These will be divided into camps; one will start Gambas, and the other Gambas2. As either system supports several features, select all items from either set. This will involve about fifteen to twenty of the Gambas or Gambas2 items being selected. Then select Apply and let the system install the Gambas items.

For an introduction to some of the abilities of the system you will need to launch your new system. To do this go to the main menu and select: More Applications -> Development -> Development Environments -> Gambas or Gambas II. You will be presented with the opening screen for the particular version you have installed.

pics

pics

This is the Welcome screen for Gambas II

By exploring the recent projects area you will be able to launch several example applications to watch the Gambas system running. Each of these applications will be read only so that they may not be altered. Here pay attention to the fact that each will have several classes and other structures which will make up the system.

To learn how to use this system, run a search for "Gambas" in Google. You may wish to learn the many features offered by the system from the wiki articles on the language. However, the best source for learning to use this system is the pdf file: A Beginners Guide to Gambas. This is a 365 page book which will guide you step by step through the process of learning how to program using the Gambas language. The examples should be followed in order as the material builds systematically on what has been learned before.

I am making a video which will be available in the "videos by eronstuc" area of You Tube. This will be called "Gambas Setup". At the moment people are being rushed out of their homes and apartments to avoid being in the path of Gustav, so this article is being cut short. There is much to learn and once you master the material you will have a very powerful tool for developing either GUI or text applications. Also, if you used one of the early computers of the 80's you will most likely recognize the true BASIC heritage of the Gambas system.

This shows the path through the main menu to launch your Gambas application.

pics

Here we see some of the many Example applications which may be launched to show just some of the power of the Gambas system. This is the set from the second version of Gambas.

Again the very best source for learning to use this system is the book: Gambas for Beginners.

Editor's Note — This was inadvertently left out last month I apologize for any inconvenience it may have caused.

mypclinuxos

Top