Topic : The GFA-Basic Compendium
Author : GFA Systemtechnik GmbH
Version : GFABasic.HYP v2.98 (12/31/2023)
Subject : Documentation/Programming
Nodes : 899
Index Size : 28056
HCP-Version : 3
Compiled on : Atari
@charset : atarist
@lang :
@default : Document not found
@help : Help
@options : +g -i -s +z
@width : 75
@hostname : STRNGSRV
@hostname : CAB
@hostname : HIGHWIRE
@hostname : THING
View Ref-FileThe items in the menu bar on the second and first screen lines are also
available via the function keys and Shift-function keys respectively.
On the far left of the menu bar is the Atari symbol (␎␏), clicking this
generates another menu containing the menu titles, Atari symbol and .
Clicking the Atari symbol causes an Alert box to appear, giving the title and
version number of 3.xx and the two options Editor and Menu. Clicking
the Editor button returns you to the Editor, or clicking Menu brings you back
to the same menu.
The Menu Bar contains the following items:
Save
A File Select box appears, by means of which the current program can be stored
by entering a program name and clicking on OK.
Load
A program can be similarly loaded into the Editor by clicking on the program
name and then clicking on OK.
Deflist
Makes possible the adjustment of the appearance of the program listing (see
DEFLIST later on for details, or experiment).
New names
By means of this item a mode can be set in which variable names are queried as
you introduce them into a program. This is useful as GFA-Baisc allows long
variable names, making typing errors possible. If you are editing a program and
do not mean to introduce new variables and you mis-type an existing name, this
feature will warn you.
Editor
Clicking this entry will return you to the editor.
On the right-hand side of the menu bar is a clock and the line number display.
The use of these two items is explained later on.
Under the Atari symbol there is a space for two further indicators, namely an
up-arrow character (⇧) to show when Caps Lock is active on the keyboard, and
the circumflex (^) showing when the numeric pad is used for cursor movements,
etc. These two modes can be entered and exited by clicking the mouse on the
space for the indicator (or the indicator itself if present).
Load (F1)
The command load is used to load a 3 program. This will be in
tokenised format, which enables programs to be loaded and saved quickly, using
less disk space. The extension '.GFA' will be looked for by default.
Earlier versions of saved their programs using a different
tokenisation process. For these programs to be loaded into version 3 they must
first be saved, using the old , in ASCII format ('Save,A') and then
loaded into Version 3 with Merge. After that they can be stored in version 3
format with Save, and then Loaded as normal.
Save (Shift+F1)
A File Select box appears, in which the desired program name can be specified.
The extension '.GFA' will be added to the file name if no other is given. If a
file of that name already exists on the disk it will be renamed to '.BAK'.
Merge (F2)
With this command a file in ASCII format can be inserted into the current
program, starting at the line above the cursor position. The default file
extension will be '.LST'. Syntax checking is also carried out during the
Merging process, but instead of interrupting with a Syntax error when an
uninterpretable line is encountered, the line will be prefixed with the
characters '==>', and must be fixed before the program can be Run.
Save,A (Shift+F2)
The current program will be stored in ASCII format. The extension '.LST' will
be added to the filename if no other is specified. If a file with that name
already exists on the disk, it will be renamed to '.BAK'.
Llist (F3)
This command causes the program to be printed out in the manner specified by
so-called Dot Commands within the program. They have no effect other than on
the printout, and are as follows, where 'x' represents a digit:
.LL xx Maximum line length
.PL xx Maximum page length
.FF xxx Form feed character (for printers, which have other
values than &H0C (Decimal 12). (.FF 012 is the default)
.HE head Text to be put on the first line of each page
.FO foot Text to be put on the last line of each page
.LR xx Left margin
.L- Conditional printing: This instruction causes the following
lines not to be printed
.L+ Printing starts again if it was stopped by a previous .L-
.N1 to .N9 Switches on line numbering adjusted to occupy up to nine
character positions
.N0 Switches off line numbering
.PA Forces a form feed
.P- The point commands are NOT listed
.P+ The point commmands ARE listed, as usual
.P+ and .P- influence the whole listing (like .Nx), the last
command gives the effect
.IN xxx Printer initialization, a string that will be printed only
once at the beginning
In the header and footer text the following can also be inserted:
\xxx The ASCII character xxx
\d Date (see MODE)
\t Time
# Page number
Note: To print the symbols \ and #, use \\ and \# respectively.
Memo: The .dot commands are not case sensitive.
A space after the command is optional.
Syntax errors are silently ignored.
There are 22 commands in all.
Comments are not supported in .dot commands.
Example: '.HE header ! test' will output 'header ! test'
Quit (Shift-F3)
After querying this command to make sure you are sure, is exited
completely and normally you will be returned to the Desktop.
Block (F4)
If no block has been marked, then the message 'Block ???' appears on the second
line in order to indicate that a block command would be unreasonable. If,
however, a block has been marked, then the Block menu appears on the top line
of the screen. Items can then be chosen with the mouse, or by pressing the key
corresponding to the first letter of the command (except for block Delete,
which for safety is called from the keyboard by Control-D).
Copy
Copies the block to the current cursor position. The block remains marked.
Move
Moves the block to the current cursor position. The block is then 'forgotten'
and no further block commands can be used until another is marked out.
Write Stores the block as an ASCII file (to be read via Merge)
Llist Prints the block out
Start Moves the cursor to the beginning of the block
End Moves the cursor to the end of the block
Del Deletes the block (Control-D)
Hide Removes the block markers
Clicking the mouse outside the Block menu or pressing a key removes it, and the
original menu is restored.
Note: The oddly placed clock symbol in the block menu seems to be a typo or
minor bug in the editor. It doesn't do anything.
New (Shift-F4)
The program currently in the Editor is deleted.
BlkEnd (F5)
The line before the cursor is marked as the end of a block. If the start of
block marker is located before this line, the block is shown in a different
color (or with a dotted background if a monochrome monitor is being used). The
end of a block can also be marked by means of Control-K, without recourse to
the Block menu.
BikSta (Shift-F5)
Marks the beginning of a block as above. Control-B from the keyboard has the
same effect.
Find (F6)
A string of text can be input, which then becomes the object of a search
starting from the current cursor postion. If the string is found, the search
can be continued for another occurrence of the string with Control-F or
Control-L. When a string is found, the cursor is put at its position, or, if
not, at the end of the program. If Find is called again, the previous search
string is presented, which may be accepted with Return, deleted with Escape, or
edited with the cursor, delete and backspace keys. The command can also be
called directly by Shift-Control-F or Shift-Control-L.
You can use the Find function to search in the header rows of closed procedures
or functions.
Procedures which have been 'folded' (see above) are not searched.
Replace (Shift-F6)
This command is for replacing one string of text by another. First the user is
asked for the text to be replaced, then the replacement text. If the text to be
replaced is found, the cursor moves to the beginning of that line. The actual
replacement can be effected with Control-E, where upon another search is made
for further occurrences of the string to be replaced. The command can also be
called from the keyboard using Shift-Control-E. The editing facilities for the
strings are available as above.
Again, 'folded' procedures and functions are not searched.
Pg ⇩ (F7)
Scrolls the screen one page down. Also called via Control-C.
Pg ⇧ (Shift-F7)
Scrolls the screen one page upwards. Also called via Control-R.
Insert/Overwr (F8)
Switches between insert and overwrite modes.
Txt 16/Text 8 (Shift-F8)
This feature is available only if a monochrome monitor is being used. It refers
to the size of characters displayed on the screen. 16-pixel high characters
(default) allow 23 lines to be displayed at once on the screen. Using 8-pixel
high characters, 48 lines are displayed.
Flip (F9)
This command switches between the Edit and Output screens. Pressing any key or
a mouse button also switches from the Output to the Edit screen.
Direct (Shift-F9)
Switches to Direct Mode, in which commands are responded to immediately, e.g.
PRINT "hello". Some commands, e.g. loop commands, are not however available in
Direct Mode. This mode can also be reached by pressing the Escape key. In
addition, by use of the up and down arrow keys, the last eight commands entered
in Dircct Mode can be recalled, edited, entered, etc. The Undo key recalls the
last command. Direct Mode can only be entered when the syntax of the current
line in the Editor is correct.
Several lines of instructons can be executed from Direct Mode by writing them
as a procedure in Edit mode and then calling it from Direct Mode.
Test (F10)
Issuing this instruction causes all loops, subroutines and conditional
instructions to be checked for consistency without actually running the
program.
Run (Shift-F10)
The program currently in the Editor is started. If this program contains a
structural fault, of the kind that could have been found with Test above, then
an appropriate error message is displayed and the program is not started. A
running program can be interrupted by the 'Break key' combination,
Control-Shift-Alternate.
The Line Number & Clock Displays
The Line number display and the Clock on the right of the menu bar both react
when clicked with the mouse. In the case of the clock, the cursor moves to the
first hour digit, and the time can be set by typing in the new time and ending
with Return. The input can be edited with the Cursor and Backspace keys, or
pressing Escape aborts the process, leaving the time display as it was.
With the Line number display, the cursor moves there, and a number can be typed
in. Pressing Return causes the cursor to jump to that line number. Instead of
clicking on the Line number display, Control-G could be typed to produce the
same effect. Only numbers are accepted as the input and they can be edited with
the Escape, Cursor and Backspace keys as before.
Memo: The Merge funtion will stop loading if ASCII character 4 (Control-D)
is encountered. If you must use this character in your program it's best
to refer to it with CHR$(4). Merge cannot read Unix format ASCII files.
Line number entry:
Allows a six digit number: 0 to 999999
Pressing return without typing a number is equivalent to typing 0.