Tandy 1000 Basic Reference Manual page 230

Hide thumbs Also See for 1000:
Table of Contents

Advertisement

Chapter 10 I BASIC Keywords
ON ERROR GOTO
Statement
ON ERROR GOTO
line
Transfers control to line if a n
error
occurs.
This lets your program recover from a n error and continue exe-
cution. (Normally, you have a particular type of error in mind
when you use the ON ERROR GOTO statement.)
You must execute a n ON ERROR GOTO before the error occurs.
To disable it, execute a n ON ERROR GOTO 0, which causes
BASIC to stop execution and print an error message. This is rec-
ommended for errors that are trapped and from which you can-
not recover.
Note: If a n error occurs during execution of an error-
handling routine, that error message is printed and
execution terminates. Error trapping does not occur
within the error handling routine.
The error-handling routine must be terminated by a RESUME
statement.
Example
1 0 ON E R R O R GOTO 1 5 0 0
branches program control to Line 1500 if a n error occurs any-
where after Line 10.
Sample Program
See ERROR.
228

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents