Vector Basic Interpreter Basic 80 Reference Manual - page 52
Extended, Disk
1)
To simula~e the
occurrence
of
a
BASIC-80
error
7
or
2)
~o
allow
error
codes
~o
be
defined by the user.
The
value
of
expression> mus~ be greater than 0 and less than 255. If ~he value of equals an error code already in use by BASIC-80 (see Appendix J), the ERROR statemen~ will simulate the occurrence of that error, and the corresponding error message will be printed. (See Example 1.) To define your own error code, use a value tha~ is greater than any used by BASIC-80's error codes. (It is preferable ~o use the highest available values, so compatibili~y may be maintained when more error codes are added ~o BASIC-80.) This user-defined error code may then be conveniently handled in an error trap routine. (See Example 2.) If an ERROR statement specifies a code for which no error message has been defined, BASIC-80 responds with the message UNPRINTABLE ERROR. Execution of an ERROR statement for which ~here is no error trap routine causes an error message ~o be printed and execution to halt. Example 1: LIST 10 S • 10 20 '1'- 5 30 ERROR S + '1' 40 END Ok RUN String ~oo long in line 30 Ok ERROR 15 String ~oo long Ok (you type this line) (BASIC-80 types this line)