Contents |
Effect
Returns the code number of the error that occured.
Can vary between 1 and 255. As MSX-BASIC uses values 1 to 25 and Disk BASIC values 50 to 81, you can use the non-defined values to generate specific error messages in your programs.
Syntax
ERR
Example
10 ON ERROR GOTO 50 20 MSX ' Generates an error, as "MSX" is not a valid MSX-BASIC command 30 END 50 PRINT "Error code ";ERR 60 RESUME 30 70 ON ERROR GOTO 0 RUN
Error code 2
Defined Errors
MSX-BASIC and Disk BASIC
Errors 72 to 75 have been added by version 2 of Disk BASIC, 76 to 81 by version 3 provided by the Nextor operating system.
HI-GRAPhics
HI-GRAPHics is an utility written by Arjen Schrijvers - see Interlacing Demo - note that the error messages can be in conflict with Disk BASIC versions 2 and 3.
HI-GRAPHics | Message |
---|---|
72 | Bad display page |
73 | Bad screen mode |
74 | Bad display mode |
Delta BASIC
Delta BASIC | Message | Message | ||
---|---|---|---|---|
200 | ENDPROC without PROC | 209 | INVALID window | |
201 | DEFPROC not found | 210 | MISSING definition window | |
202 | ENDPROC not found | 211 | LOCATE out of window | |
203 | MODE error | 212 | MEMDISC initialised | |
204 | UNNEW without NEW | 213 | LINE number too big | |
205 | Program recovered | 214 | MOVLIN error | |
206 | TOO MUCH varspace | 215 | COPLIN error | |
207 | NO ROOM for vars | 216 | STATE size | |
208 | INVALID definition windows |
Related to
ERL, ERROR, ON ERROR GOTO, RESUME
Compatibility
MSX-BASIC 1.0 or higher