Sharp logo
Error messages 
( of Sharp's BASIC interpreter 1Z-013B )  

Error message format

There are two formats of error messages:

1. <message> ERROR

This type of error message will appear while the execution of an erroneous BASIC command directly typed in or if an error was detected during the execution of the edit mode.

2. <message> ERROR IN <line#>

This type of error will appear if an error was detected while running a BASIC program.

ERN and ERL

The error number is stored into the BASIC variable ERN by the BASIC interpreter. The BASIC line number in error is stored into the BASIC variable ERL by the BASIC interpreter. You can write your own error routines to prevent an abnormal end of your BASIC program by the BASIC command ON ERROR GOTO. Your own error routine should try to analyze the error and to restart the program correctly.

Examlpes of possible commands for error handling:

200 ON ERROR GOTO 1000
210 IF A=B THEN ERROR 44
|
|
1000 IF ERN=44 THEN PRINT "My own error message"
1010 IF ERN=44 THEN ERROR 1: REM any value from 0 to 255, error message while BASIC program abnormal ends will be "Syntax error"

Error messages

The following table contains all error messages and the associated error numbers.

Error number Error message Description
1
Syntax error The syntax of the command is invalid
2
Overflow error Overflow during arithmetic operation or a value exceeds the admitted range
3
Illegal data error The constant or the variable used is invalid
5
String length error Length of string exceeds 255 characters
6
Memory capacity error The amount of memory is too small
7
Array def. error An existing array was redefined to increase its size
8
Line length error BASIC program line exceeds maximum length
10
GOSUB nesting error Nesting of GOSUB definitions exceeds the memory capacity
11
FOR-NEXT error Number of FOR-NEXT definitions exceeds the memory capacity
12
DEF FN nesting error Nesting of DEF FN functions exceeds maximum
13
NEXT error NEXT without FOR
14
RETURN error RETURN without GOSUB
15
Undef. function error Undefined function executed
16
Undef. line num. error Undefined line was referenced
17
Can't continue Unable to execute CONT command
18
Memory protection Violation of BASIC's protected workarea by any write
19
Instruction error Direct BASIC command and BASIC execution command mixed
20
Can't RESUME error Unable to execute RESUME command
21
RESUME error RESUME executed at a non-error condition
24
READ error READ without DATA
43
Already open error File already open
63
Out of file error Further read after end of file
65
Printer is not ready Printer not connected or not online
67
Out of paper Plotter operation exceeds the plot range
68
Printer mode error Command not supported for the active operation mode of the plotter ( change mode! )
70
Check sum error Error while reading file from the data recorder


Go to the top of this page Home

last updated August 4, 2002
sharpmz@sharpmz.org