Specifications
Error Messages - 1
The following list of error messages are returned by CAMBASIC. These indicate clearly, what is wrong, within the context
of a program, and should be of great use in program debugging.
NUM MESSAGE EXPLANATION
0 <Unknown error> Error is undefined
1 <NEXT w/o FOR> A NEXT statement is encountered without a matching FOR.
2 <Syntax> A line is encountered that includes an incorrect sequence of characters
(misspelled keyword, incorrect punctuation, etc.).
3 <RETURN w/o GOSUB> A RETURN statement is encountered for which there is no previous,
unmatched GOSUB statement.
4 <Out of DATA> A READ statement is executed when there are no more DATA statements
with unread data remaining in the program.
5 <Illegal argument> A parameter that is out of range is passed to a numeric or string function.
This error may also occur as a result of:
a. A negative or unreasonably large subscript.
b. A negative or zero argument with the LOG function.
c. A negative argument to SQR.
d. A negative mantissa with a noninteger exponent.
e. An improper argument to MID$, LEFT$, RIGHT$, PEEK,
POKE, TAB, SPC or ON...GOTO.
f. Other function arguments which exceed the limits of the function.
6 <Overflow> The result of a calculation is too large to be represented in CAMBASIC
single–precision format. If underflow occurs, execution continues without
an error.
7 <Out of memory> A program is too large, or has too many loops, subroutines, and/or
variables; or has expressions that are too complicated to evaluate.
8 <Line/label not found> A nonexistent line number is referenced in an EDIT, DELETE, RENUM,
etc. statement.
9 <Subscript out of range> An array element is referenced, either with a subscript that is outside the
dimensions of the array, or with the wrong number of subscripts.
10 <Array already dimensioned> Two DIM statements are given for the same array; or a DIM statement is
given for an array after the default dimension of 11 has been established
for that array.
11 <Division by zero> A division by zero is encountered in an expression; or, the value zero has
been raised to a negative power. In the first case, the result is machine
infinity (with the appropriate sign); in the second case, the result is
positive machine infinity.