Glentop Press Ltd.
THE
BASIC
As a
programmer who learnt the BASIC language many years ago but then
left for the brave new world of C, the opportunity to review GFA
BASIC was an interesting chance to see what BASIC has been getting
up to since I left.
GFA BASIC comes in a video cassette style box, and
includes a 293 page ring bound manual and a single floppy disk. The
disk contains two versions of the BASIC (both unprotected – please
don't abuse), a full featured one for program development, and a
run-only version to allow you to give away or sell your programs.
IT DOESN'T USE GEM!
Being a normal user, the first thing I did was not
study the manual but run the BASIC program. I have had my ST since
the first shipment hit the U.K., and since then have become very
familiar with the GEM interface, using windows, icons, menus and
mice. When I ran GFA BASIC therefore I had quite a shock. GFA BASIC
is a standard text mode program, though it does use a mouse. I fully
expected to find GFA BASIC using windows, but having used it for a
while, I have to admit that even without windows, it still presents
a good environment to work in. GFA uses a 'Command line' menu at the
top for mouse selections which is similar to a drop down menu but
nothing drops down! There are ten options, doubled up to make
twenty. Clicking on the command text, or pressing a function key
(shifted for the extra ten), activates the command. Commands include
load, save, run, program check, search, replace and block functions,
as well as options like insert and overwrite mode toggles, and (on
monochrome screens) a 50 line mode.
The BASIC program is not entered in the traditional
form with line numbers, but is entered with one command to a line
and automatically 'tabbed' within loops (GFA is a procedural BASIC,
also incorporating DO...LOOP, REPEAT...UNTIL and WHILE...WEND). A
nice touch is that keywords can be differentiated by automatically
capitalising the first letter. I did miss a scroll bar to reflect
the current position within the program and to provide easy movement
to anywhere in the program, but for those who do not like GEM, this
may be not be a problem.
IT DOES USE GEM!
GEM is not neglected by the program though, for
whilst the programming environment is not GEM based, very good
provision has been made within the commands for incorporating GEM
into a user's program. As an example, it is possible to define an
array of text strings, which can then be used with a command to
build a proper GEM menu bar across the top of the screen. Activating
the menu is then just a case of using the command 'ON MENU GOSUB'.
The user must know a bit about the GEM system, but other commands
allow much more transparent access to GEM facilities, like the
window commands, and an alert handler. So the programmer who wants
to use GEM is not held back by GFA (an interface to the heart of GEM
is provided if you want to sidestep or enhance the standard
facilities).
GFA BASIC is not just about working GEM however, as a lot of new and
useful functions have been added to make programming in BASIC a lot
easier and more powerful. I cannot include them all, but for a few
examples: access to the address of a variable, and passing of
pointers to procedures; single operand maths functions like ADD A%,5
(which is twice as fast as LET A% = A% + 5); graphics primitives
(lines, boxes, circles, ellipses); chaining of other programs; date
and time functions; structured file read/writing and random access
files; PRINT USING; form inputs (limiting input to a set length);
local variables in procedures; reading of all mouse actions (x,y,
buttons, leaving/entering boxes); sprite definition; sound command;
upper/lower case of a string; butter type block moves; screen
save/restores; an 'approximately' equal to comparison; and both user
and supervisor mode POKE functions (byte, word and long sized) for
twiddling within the computer. I can't cover them all here, and I
haven't included the more basic (no pun intended) functions that
have been added. Overall this is a function packed BASIC.
THE MANUAL
Considering the number of functions and the general power of GFA
BASIC, it is a great pity that it is let down by the manual.
Despite its size, and at least one page per command,
it does not give as much information as I would have liked, and it
is often not very clear, partly because of its (obvious) German
translated origin. Another point is that it has been printed on a
bright red paper, a technique used to stop photocopying. I tested
this and found that with a bit of experimentation, the photocopy was
easier to read than the original manual! Glentop told me they were
doing a new manual, and may be dropping the red paper. I hope that
existing owners will be able to send back their manual with a SMALL
fee to upgrade to a new one. At the current time, the manual is a
disappointment, but it does contain all the information – you just
have to spend a long time finding it as there is no index.
CONVERTING PROGRAMS
My experiments with the system included an attempt to
convert an old 8 bit Atari BASIC program ('Matthews Label Maker') to
run on the ST. GFA provide a program which converts Atari ST BASIC
programs (with line numbers and multiple statements per line), and
converts it to a file suitable for GFA BASIC (single command per
line, using labels in gotos). After a few unsuccessful runs (the
program picks up on FORs in REMs), the program was in a form
suitable for reading into GFA BASIC. It seemed too good to be true,
and was, for my original program seems to have had some convoluted
system of conditional NEXTs in it, and I got a 'procedure in a loop'
error, which meant I was totally unable to use my original (I can't
remember how it works any more!). This may not be typical though,
and if I were to write it again today, I would make much more use of
the structuring capability of languages like GFA BASIC.
A set of public domain programs for GFA BASIC is also
included, which really show off the program to its best. Some are
quite astonishing (for instance an animation of a horse by blitting),
and if I hadn't run them myself I might not have believed they were
written in BASIC (and interpreted BASIC at that). More GFA BASIC
programs are available from other public domain sources.
THE COMPILER
The separately bought compiler comes in the same style box, with a
31 page manual and disk. Compiling is very simple. A dialog is
presented which shows the possible options, and when you have chosen
you select a file to compile, then a file to save it as, and then it
is done. Simple as that. The available options are: whether the
program can be stopped by pressing the Shift/Alternate/Control keys
together (and how often checks are made for them); whether integer
overflow will be trapped; whether run-time error messages are text
and number or number only; whether bombs are to be trapped (e.g.
erroneous instructions which cause three bombs can be stopped and
made to create an error 103, and thus detected by ON ERROR GO SUB).
All the options can be specified in the source code if desired.
Only a few commands cannot be compiled, and they are
only because they are not applicable (like LIST and SAVE). No
separate compilation is possible, so it is not possible to split
your code up into smaller files, but this is not too much of a
drawback. The only requirement for distributing the compiled code is
that you acknowledge GFA BASIC.
CONCLUSION
GFA BASIC is a very capable programming system, and would be quite
suitable for any level of programming, from beginner to very
advanced. It is a pity that GEM is not used when writing programs,
but not having it probably contributes to the claimed interpreter
size of only 55k, and the program is quite usable anyway. The only
drawback to GFA BASIC is the manual, but this may be replaced soon.
The compiler is a nice option, but with the run-only version of the
interpreter supplied, only the commercial user will need it as the
interpreter does a very fast job on its own. If GFA BASIC is
representative, BASIC has come a long way in the last few years.
GFA BASIC interpreter and compiler cost £45.95
each, and are available from: Glentop Press Ltd, Standfast House,
Bath Place, Barnet, Herts, ENS SXE
top