User`s manual
8-3
ERL
Returns the line number in which an error has occurred. This function is
primarily used inside an error-handling routine accessed by an ON ERROR
GOTO statement. If no error has occurred when ERL is called, line number 0
is returned. However, if an error has occurred since power-up, ERL returns
the line number in which the error occurred. If error occurred in direct mode,
65535 is returned (largest number representable in two bytes).
Example Program using ERL
5 CLEAR 10
10 ON ERROR GOTO 1000
20 INPUT"ENTER YOUR MESSAGE";M$
30 INPUT"NOW ENTER A NUMBER";N: N=1/N
40 REM REST OF PROGRAM BEGINS HERE
.
.
.
999 END
1000 IF ERL=20 THEN 1010 ELSE IF ERL=30 THEN 1020
1005 ON ERROR GOTO 0
1010 PRINT "TRY AGAIN--KEEP MESSAGE UNDER 11 CHARACTERS"
1015 RESUME 20
1020 PRINT"FORGOT TO MENTION: NUMBER MUST NOT BE ZERO"
1025 RESUME 30
RUN the program. Try entering a long message; try entering zero when the
program asks for a number. Note that ERL is used in line 1000 to determine
where the error occurred so that appropriate action may be taken.










