136
A sample ON ERROR statement is shown below:
010 ONERROR GOTO 50
020 A=100/0
030 PRINT 'A= 'A
040 STOP
050 ON ERROR SYSTEM
060 PRINT 'ERROR' &ERR 'HAS OCCURRED, at LINE' &LlNE
RUN
ERROR 681 HAS OCCURRED AT LINE 20
In this example, the ON ERROR statement at statement number 010 causes the
program to go to statement number 050 if any errors occur. The ON ERROR
statement causes the 5100 to return to normal error processing, then
statement 060 causes the error message, ERROR 681 HAS OCCURRED AT
LI N E 020, to be printed.
("
"-
..
/