When GFA BASIC first reached the United States from Germany, it created quite a stir. It was the first general purpose interpreted language for the ST that was fast, easy to use and accessed GEM in a relatively straightforward manner. It became even more attractive upon the release of the GFA BASIC Compiler, which could turn your program into a standalone .PRG file.
GFA BASIC became the language of choice for many ST owners, especially since it did not need the complicated Compile-Link-Debug cycle required by C. Since its introduction, GFA BASIC has become the most popular ST language for magazine listings as well. (Editor's Note: We receive more program submissions at START in GFA BASIC than in any other language.)
GFA BASIC 3.0, the newest version of this popular language, adds many more features and functions and is considerably faster. Let's look at version 3.0 and see what it has to offer.
Another new feature is a line counter that keeps track of your place in the program. While GFA BASIC does not use line numbers per se, you can type in the line counter value for a particular line and the editor will jump to that line.
To enter a program in the editor, just type it in or load it from disk. Each line can contain only one command. The editor automatically indents loops and procedures (more on this later) and you can set it to capitalize commands and put variables in upper-lower case automatically. You can also set the format of printed listings by adding headers and footers, setting the maximum line length and doing other things you couldn't do with version 20.
Various key combinations move the cursor around in the editor-you can even set the number pad to control cursor movement much as it does on the PC. Reminiscent of 8-bit Atari BASIC, GFA BASIC 3.0 and 2.0 analyze each line for proper syntax as you go. If you try to leave a line that has a syntax error the bell will sound, a message will appear at the top of the screen and you must correct that line before moving on.
Once you've typed in or loaded a program, you can run it just by clicking on Run in the function bar. If any errors occur, the program will return you to the editor with the cursor on the offending line and a brief error message at the top of the screen. You can also shift to the output screen to give single commands in "direct" mode, useful for checking the values of variables, etc.
The GFA 3.0 editor does not use standard GEM menus. Instead, there are two lines of functions at the top of the screen, similar to version 2.0's editor. To activate a function, you can click on it with the mouse or press the corresponding function key (or Shift-function key combination). The function bar has standard commands such as loading saving printing a listing, block operations and merging. Differences from the GFA 2.0 editor include a real-time clock in the function line at the top of the screen and a toggle that switches the screen to GEM format to let you access desk accessories and load or save programs.
By David Plotkin