Introduction
If you haven't got GFA BASIC download it now!
This guide is intended to give those with previous programming experience an overview
of the common GFA BASIC commands. I suggest that you read it from start to finish. Command
syntax is represented in a simple fashion. Optional or alternative clauses are enclosed in
square brackets. Rounded brackets indicate that while there is a choice of clause, one
must be chosen. The ellipsis (...) is used to represent either a block of code, or the
repetition of an expression. Commands are written in uppercase, and variables in lowercase.
Now for a brief overview of the interpretter.

fig.1 The GFA BASIC Menu Bar
When the interpreter is run in high resolution the screen is headed by the
menu bar in figure 1. In low and medium resolutions the menu differs
slightly, the Text 16 option (q.v.) is absent. Options may be
selected using either the mouse or the keyboard. The top row of options may be
selected from the keyboard by holding down the shift key while pressing a
function key, F1 for Save through to F10 for Run. The bottom row of
options may be selected using the function keys alone, F1 for Load through to
F10 for Test. I'll now give a brief description of each option.
- Save
- Saves the program to disk in binary (machine-readable) format.
- Save, A
- Saves the program to disk in ASCII (human readable) format.
- Quit
- Takes you back to the desktop without saving the program.
- New
- Clears the current program without saving it.
- Blk Sta
- Marks the beginning of a block of code to be edited using the Block
option.
- Replace
- Allows you to replace a designated text string with another throughout
the current program.
- Pg Up
- Scrolls the program back one screenful.
- Text 16
- In high resolution, this toggles the text size used by the editor.
- Direct
- Facilitates command line mode. This allows one line BASIC statements,
program procedures and other commands to be executed immediately. Some
useful commands are:
- CHAIN "filename"
- Loads a program and runs it immediately.
- CONT
- Resumes the execution of a program. STOP may be placed
anywhere within a program. When CONT is typed, execution
proceeds from the next executable statement.
- DEFLIST n
- Defines the program listing format. When n is 0, functions
are capitalised and variable names printed in lowercase. When n
is not 0 (e.g. 1), the first letter of any word is capitalised.
- EDIT
- Returns you to the editor.
- LIST "filename"
- Stores the current program in the specified ASCII file.
If no filename is given, the program is listed to the screen.
- LOAD "filename"
- Load the specified program into memory.
- NEW
- Deletes the current program and clears all variables.
- QUIT
- Returns you to the desktop.
- SYSTEM
- Same as QUIT.
- SAVE "filename"
- Saves the current program to the specified binary file.
- PSAVE "filename"
- Saves the current program to the specified binary file.
When the program is loaded, it is run immediately.
- Run
- This causes your program to be interpreted.
- Load
- Load a program into memory.
- Merge
- This allows you to import a piece of code (in ASCII format) to your program.
- Llist
- Outputs the program to the printer.
-
- Block
- Allows you to either copy, move, delete or hide a marked block. Blocks
are copied or moved to the cursor position. Blocks may also be marked
using this option. Blocks may be listed to disk or printer using this
option. These sub-options may be selected using either mouse or keyboard.
- Blk End
- Marks the end of a block of code to be edited using the Block option.
- Find
- Attempts to place the cursor at the next occurrence of a given text string.
- Pg Down
- Scrolls the program forward one screenful.
- Insert
- Toggles the editor between insert and overwrite mode.
- Flip
- Flips between the edit screen and the output/ direct screen. Press
ESC or F9 to return to the edit screen.
- Test
- Tests the current program for errors.