Appendix B: Reports
From BASin
Appendix B: Reports
These appear in the Error window whenever the computer stops executing some BASIC, and explain why it stopped, whether for a natural reason, or because an error occurred.
The report has a code number or letter so that you can refer to the table here, a brief message explaining what happened and the line number and statement number within that line where it stopped. (A command is shown as line 0. Within a line, statement 1 is at the beginning, statement 2 comes after the first colon or THEN, and so on.)
The behaviour of CONTINUE depends very much on the reports. Normally, CONTINUE goes to the line and statement specified in the last report, but there are exceptions with reports 0, 9 and D (also see Appendix C).
Here is a table showing all the reports. It also tells you in what circumstances the report can occur, and this refers you to Appendix C. For instance error A Invalid argument can occur with SQR, IN, ACS and ASN and the entries for these in Appendix C tell you exactly what arguments are invalid.
Code |
Meaning |
Situations |
0 |
OK | Any
|
1 |
NEXT without FOR | NEXT
|
2 |
Variable not found | Any
|
3 |
Subscript wrong | Subscripted variables, Substrings
|
4 |
Out of memory | LET, INPUT, FOR, DIM, GO SUB, LOAD, MERGE.
|
5 |
Out of screen | INPUT, PRINT AT
|
6 |
Number too big | Any arithmetic
|
7 |
RETURN without GO SUB | RETURN
|
8 |
End of file | Microdrive, etc operations |
9 |
STOP statement | STOP
|
A |
Invalid argument | SQR, LN, ASN, ACS, USR (with string argument)
|
B |
Integer out of range | RUN, RANDOMIZE, POKE, DIM, GO TO, GO SUB, LIST, LLIST, PAUSE, PLOT, CHR$, PEEK, USR (with numeric argument), Array access
|
C |
Nonsense in BASIC | VAL, VAL$
|
D |
BREAK - CONT repeats | LOAD, SAVE, VERIFY, MERGE, LPRINT, LLIST, COPY.
|
E |
Out of DATA | |
F |
Invalid file name | SAVE
|
G |
No room for line | Entering a line into the program
|
H |
STOP in INPUT | INPUT
|
I |
FOR without NEXT | FOR
|
J |
Invalid I/O device | Microdrive, etc operations |
K |
Invalid colour | INK, PAPER, BORDER, FLASH, BRIGHT, INVERSE, OVER; also after one of the corresponding control characters.
|
L |
BREAK into program | Any
|
M |
RAMTOP no good | CLEAR; possibly in RUN
|
N |
Statement lost | RETURN, NEXT, CONTINUE
|
O |
Invalid stream | Microdrive, etc operations |
P |
FN without DEF | FN
|
Q |
Parameter error | FN
|
R |
File loading error | VERIFY, LOAD or MERGE
|
The following reports are 128k only, and will only appear when using one of the 128k commands. They are not common to the 48k Spectrum, hence their code appearing in reports in lower case.
Code |
Meaning |
Situations |
a |
MERGE error | MERGE !
|
b |
Wrong file type | MERGE !, LOAD !
|
c |
CODE error | LOAD ! "file" CODE
|
d |
Too many brackets | PLAY
|
e |
File already exists | SAVE !
|
f |
Invalid name | ERASE !
|
h |
File does not exist | LOAD !, ERASE !
|
i |
Invalid device | FORMAT
|
j |
Invalid baud rate | FORMAT
|
k |
Invalid note name | PLAY
|
l |
Number too big | PLAY
|
m |
Note out of range | PLAY
|
n |
Out of range | PLAY
|
o |
Too many tied notes | PLAY
|