IF ERROR, JUMPS TO THE PART OF PROGRAM WHICH BEGINS BY "L:"
ACTION
The command ON_ERROR_GOTO makes program execution jump to the location called "L", if an error occurs.
L is a label and must be defined by the keyword LABEL.
remark:
when an error occurs,
ERROR_LINE contains the source line number which caused the error,
ERROR_NUMBER contains the code of the happened error,
ERROR_TYPE$ contains an explanation of the error.
The explanation is in English by default, but the language can be changed: ERROR_FRENCH for French, ERROR_ENGLISH for English.
SYNTAX:
ON_ERROR_GOTO L
USE ERROR EXAMPLE
label err
on_error_goto err
top 0, 3+:rem here error
print "never printed"
err:
print "error"
print error_number
print error_type$
print error_line
ON_ERROR_GOTO
ON_ERROR_GOTO L
SEE ALSO
ERROR_ENGLISH
ERROR_FRENCH
ERROR_LINE
ERROR_NUMBER
ERROR_TYPE$