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-FileIt is possible in GFA BASIC 3 to use programs from older versions.
For this purpose, programs written in the earlier version must be stored as
ASCII files, using the SAVE,A command. They can then be loaded into Version 3
by means of MERGE and, there after, treated as 3 programs being SAVEd
and LOADed in the normal way.
Version 3 contains all the commands which are in earlier versions of the
interpreter, although there are some small differences in the interpretation of
commands which may make some modification of earlier programs necessary.
MUL, DIV
The commands MUL and DIV work in 3 with integer variables (|,&,%) and
integer parameters only.
In the earlier versions, the program:
a%=10
MUL a%,2.5
PRINT a%
produced the output 25.
In Version 3, however, MUL does not take account of the fractional parts of
inputs, treating them all as integers. Thus, the value to the right of the
decimal point is ignored, so, in the above example, the integer a% is set to
20. This incompatibility between versions is the price paid for these commands
being many times faster than their counterparts in the earlier versions of
, the increase in speed coming from the use of true integer
arithmetic. This incompatibility does, of course, only apply to integer
variables.
PRINT USING
PRINT USING displays only the numbers that fit in the designated format. This
can mean that it is possible that wrong values will be displayed, instead of
wrong formats as in earlier versions, if the length of the number is too great.
The actual accuracy is, of course, not affected just the display. Care must
therefore be taken when using this command.
CLS, PRINT, TAB()
At CLS, the string ESC-E-CR is now issued, so that the PRINT command will be
able to treat TAB() correctly.
KEYPAD
A program, which queries the keys of the numeric key-pad and Alternate and/or
Control, requires that a KEYPAD 0 be issued to switch this off now. The same
is valid for the function keys with Alternate.
MOUSEX, MOUSEY
If windows are active and MOUSEX or MOUSEY are interrogated, then negative
coordinates arise above and to the left of the window border (e.g. CLIP
OFFSET). In Version 2.x CARD(MOUSEX) or CARD(MOUSEY) returned these values.
OPTION
In version 2 the command OPTION was used to control the compiler. This command
has been replaced by the $ command in version 3.
Licence
Programs written to run in Interpreted mode can be run by means of the Run-only
Interpreter which is supplied with the Interpreter. This contains all
the routines necessary for the running of programs and can be
distributed by bonafide owners along with their programs, thus
allowing all ST users to run any software written in . The Interpreter
itself is sold for use by the owner, on one machine and copies may not be
passed on to another user.
Programs written in Version 3 will be capable of being speeded up in
operation by the use of the 3 compiler. This is designed to produce
programs which are executable without the need for supporting code, i.e. they
are true stand-alone .PRG files which can be distributed freely by the author.
Our only request is that an acknowledgement that they were produced using GFA
BASIC be included.