home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 9
/
FreshFishVol9-CD2.bin
/
bbs
/
reviews
/
programmer.lha
/
programmer
/
GFABasic
< prev
next >
Wrap
Internet Message Format
|
1992-05-06
|
19KB
From: honp9@menudo.uh.edu (Jason L. Tibbitts III)
Subject: REVIEW: GFA BASIC v3.5
Followup-To: comp.sys.amiga.programmer
Keywords: programming, BASIC, compiler
Organization: Blob Shop Programmers
Reply-To: clcp16@vaxa.strath.ac.uk (Stewart C. Russell)
GFA BASIC 3.5 is a fast BASIC interpreter, with advanced commands which
include matrix manipulation and direct access to the Exec, Intuition, Dos,
and Graphics libraries. The optional compiler generates code which is
comparable in execution speed to a good C compiler.
*** Statement of Interest ***
I have no commercial links with any part of the GFA organisation.
I have written several tutorial articles on GFA BASIC in Jeff
Walker's Just Amiga Monthly (JAM) magazine, the UK's only non-games
Amiga magazine. I have never received any incentive, financial or
otherwise, to write about GFA BASIC; I paid cash for my GFA system.
*** Product Preamble ***
Product: GFA BASIC 3.5 Interpreter
GFA BASIC 3.5 Compiler
Supplier: GFA Data Media (UK) Ltd
Box 121
Wokingham
Berkshire
RG11 1FA
England
Price: Interpreter #49.95 Sterling
Compiler #29.95 "
Those hashes are pound signs, btw; ASCII doesn't support them. I have
tried to find the suppliers outside the UK, but have received no answers
yet. The product is advertised in Amiga World, discounted to around $85
(for the Interpreter, I assume) and one of the advertisements suggests that
the US distributor is Antic.
*** Reviewer Info ***
Stewart C. Russell
Paper Mail Address: 140 Capelrig Road
Newton Mearns
Glasgow G77 6LA
Scotland
Telephone: 041-639 5372 (in UK)
E-Mail: clcp16@vaxa.strath.ac.uk
(This account should be active until July, when I graduate.)
scruss@cix.compulink.co.uk
(This is my "professional" account. I get charged for any
international mail I receive or send, so use only as a last resort.)
[Ed. note: Mr. Russel has informed me that he can forward any queries to
Les Player, the MD of GFA Data Media (UK) Ltd. I prefer not to give
Mr. Player's address publicly.]
AmigaBASIC isn't one of the world's marvels of high speed execution. It
also get bored with the tedium of running your programs sometimes, and
wanders off into oblivion.
The first version of GFA BASIC I saw (v3.041) was fast, but was so bug
ridden as to be completely useless. In a way, it was like the first release
of the Amiga's operating system; it had something special, but the bugs
made it less than useful. And now the bugs are (mostly) gone, people
remember it as it used to be - unstable.
GFA BASIC has been long in development, originally appearing on the Atari
ST around 1986. There is still the lingering feeling that, although the
authors are clearly excellent programmers, they are still not 100% sure of
the Amiga.
What you get
------------
There are at least 300 commands in GFA BASIC, ranging from bit operations
to a file requester. Most of the inch-thick manual is given over to command
descriptions, with very small program fragments illustrating command usage.
There is no tutorial in the manual, and the lack of properly commented
examples (they are commented - but in German) is worrying. The manual
suffers from truly appalling translation in places, which can range from
the faintly amusing to the downright misleading.
The GFA BASIC 3.5 interpreter is some 135 KB in length, allowing it to run
comfortably on a basic A500. Only one program can be edited at a time, but
multiple interpreters can be run. When this is done, blocks of text can be
cut from one interpreter and pasted to another.
A shorter run-only interpreter is also supplied, and this may be freely
distributed with your programs. This program only accepts tokenised GFA
BASIC files, and consequently could never be used for program development.
The Front End
-------------
The single-bitplane editor screen has two rows of ten gadgets along the
top, with a clock and a line number indicator on the right hand side. These
gadgets allow various file operations (Load, Save, etc) and edit operations
(Block, Find, etc). These gadgets correspond to function and Shift-function
key combinations.
A couple of these gadgets merit special mention. The Test gadget tests the
integrity of your program's flow control structures, and warns you of any
problems. The Direct gadget drops you into a command line, where BASIC
commands are executed as you type. You should be able to work out what the
Run gadget does.
The GFA editor is rather strange. It parses the input line when you press
Return, and won't let you continue if there is a syntax error. It also does
not allow blank lines, insisting on an apostrophe at the least. You'll hate
it at first, but when you realise that it allows abbreviated input (p for
PRINT, inp for INPUT) and automatically indents loop structures, you'll
begin to like it more. Only one command is allowed per line, and line
numbers must not be used. In line comments are allowed though, but these
must be prefixed with an exclamation mark.
Functions & Features
--------------------
GFA BASIC knows about most of the commands in the Intuition, Dos, Exec,
Layers, Diskfont Graphics and Icon libraries, and parses them
appropriately; typing in "a%=allocremember(...)" for example would result
in "a%=AllocRemember(...)" being returned. (The very pedantic would also
note that a syntax error would be returned too; ellipsis is not a valid
input to AllocRemember()... :-) )
If your favourite routines exist in another library, you can use the FD
file to create the basis for a stub. I've already used this to create
interfaces for the iff.library (for IFF handling) and the medplayer.library
(for playing MED modules). In this respect, being able to call these
library functions from an interpreted language makes GFA BASIC a great
prototyping tool.
As with most modern BASICs, GFA supports SELECT...CASE structures, and
ELSEIF clauses in IF structures. All structures support an EXIT IF clause,
which works similarly to "break" in C.
INC, DEC, ADD, SUB, MUL and DIV manipulate variables far more quickly than
the more usual infix operators. Bitwise operators exist which are similar
to (when compiled, identical to) 68000 instructions.
Windows and Screens are handled well, with HAM and Halfbrite as accessible
as in any other language. All the Window/IDCMP flags are available too.
Graphics commands are slightly better than AmigaBASIC's offerings; the DRAW
command contains a full turtle graphics package, based on HPGL. A slight
nasty is the DISPLAY command; this is a hangover from the Atari, where it's
quite safe to switch off Display DMA. DISPLAY on the Amiga results in
horrific flickering and all-over nastiness; avoid.
Two useful hangovers from the Atari are ALERT and FILESELECT. ALERT creates
a small requester similar to the GEM Dialog box, and nothing like as
frightening as an Intuition red Alert(). FILESELECT creates a usable file
selector; it's not as good as the ARP one, but it works well. ALERT and
FILESELECT are not Requesters, so they don't need a window to be attached
to.
Arrays are used in the way that BASIC originally intended; as matrices.
Matrices can be added, subtracted, multiplied, inverted, transposed, copied
(in whole or part, with optional transposition) and the determinant and
rank obtained. Matrix housekeeping tasks for storing, recalling and
printing matrices are supplied; a reasonable package.
Arrays can also have members inserted, deleted or moved, so dynamic list
handling is a possibility. Hardcoded quicksort and shellsort routines
(fast) mean that the old bubble sort routine you've trusted since your PET
days can finally be put out to grass.
Sound handling is OK. I rarely use it though.
Variable Types
--------------
The standard GFA integer is 32 bits long, unlike AmigaBASIC's sixteen which
corresponds to GFA's Wo