BASIC PROGRAMMING
SECTION li.9
HUNTER 's Basic interpreter contains many features designed to
prevent the inexplicable happening in the field: but complex
programs can sometimes outwit even their own authors!
A simple solution to this problem is simply to add three more
lines:
50 ONERROR 500
500 PRINT ''THAT CAN'T BE RIGiT - PLEASE TRY AGAIN"
510
GOTO 100
Now, all the error messages from the interpreter are intercepted
and re-directed. The program simply tries again. This is fine,
but the problem remains: the errors shouldn't be there in the
first place!
lJ,9,2
DATA STORAGE ARRAYS
4,9,2,1 Types of Arrays
Captured data is generally held in array structures created
within HUNTER's very large memory. There are three types of
array:
Simple Variables
Double Precision
Strings
Simple Variables are used for storage of decimal values of up to
6 digit accuracy,
Double Precision arrays store numbers up to 14 digit accuracy,
but use more memory,
NOTE: Both these types store much larger numbers than indicated,
but only by truncating the least significant digits, For
example, the number 12345678 entered as a simple variable would
be stored and reproduced as 12345600,
String Arrays store every character, whether numeric or
otherwise, literally. They can have any number of characters
(up to a maximum of 255 characters in each string). Facilities
are provided for converting strings to numbers and vice versa.
4.9.2.2
Array Structures
VER.V09F
Every array is denoted by a name and placed in memory in a
sequential table. Multiple arrays are packed in memory by Basic
and accessed via a
Symbol Table.
PAGE lJ - 25