If Erl - Sharp MZ-80B Basic Manual

Personal computer double precision disc
Hide thumbs Also See for MZ-80B:
Table of Contents

Advertisement

The statement shown below causes program execution to jump to line 1 200 when
Example
Error 5 (String Overflow) occurs, indicating that the string length exceeded 2 5 5
characters.
2.3 .3

IF ERL

IF ERL expression THEN lr
Format
I F ERL expression THEN statement
I F ERL expression GOTO lr
lr . . . . reference lin e num b er
This statement determines the number of the line on which an error has o ccurred
Function
and causes branching to a specified line.
Since system variable ERL is loaded with the number of the line on which an
Description
error occurred, the I F ERL statement in the routine declared by the ON E RRO R
GOTO statement is able to ascertain this line number from system variable E RL.
The IF ERL statement, like the IF E RN statement, may be used in two forms:
I F
The statement shown below causes program execution to jump to line 1 3 00 when
Example
an error occurs on line 2 5 0 .
800 IF E RN = 5 THEN 1 200
THEN or I F
GOTO.
-
-
8 1 0 IF ERL = 2 5 0 THEN 1 3 00
29

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents