ERROR
Contents |
Effect
Simulates an error that is specified by its code.
Syntax
ERROR <ErrorNumber>
Parameter
<ErrorNumber> 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. Variables are not usable.
Example
10 ON ERROR GOTO 400 20 INPUT "X= ";A 30 IF A>100 THEN ERROR 150 40 IF A<10 THEN ERROR 151 50 END 400 IF ERR=150 THEN PRINT "MAXIMUM 100!" 410 IF ERR=151 THEN PRINT "MINIMUM 10!" 420 RESUME 20 430 ON ERROR GOTO 0
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, ERR, ON ERROR GOTO, RESUME
Compatibility
MSX-BASIC 1.0 or higher