
7-6
Section
Details of BASIC Commands
155
erl
Syntax:
ERL
Description:
System Variable. Stores the line number executing at the time an error occurred.
ERL
is a read-only system variable; it cannot be assigned a value.
ERL
can be helpful in error processing when used with
ERR
and the
ON ERROR GOTO
statement.
The contents of
ERR
and
ERL
can be checked from an error-processing interrupt subroutine and the
information (error code and line number) can be used for error processing.
Remarks:
Note:
1.
ERL
will have a value 0 if statements causing an error are executed at the command
prompt.
2.
When an error occurs, the flow of the program can be controlled by using the ERL
function in an interrupt subroutine.
Examples:
>
10 ON ERROR GOTO 1000
>
20 A=A/0
>
30 END
>
1000 PRINT "ERROR #";ERR;" OCCURRED AT LINE ";ERL
>
1010 END
>
RUN
ERROR #11
OCCURRED AT LINE
20
See also:
ERC
,
ERR
err
Syntax:
ERR
Description:
System Variable. Stores the error code after an error has occurred.
ERR
is a read-only system variable; it cannot be assigned a value.
ERR
can be helpful in error processing when used with
ERL
and the
ON ERROR GOTO
statement.
The contents of
ERR
and
ERL
can be checked from an error-processing interrupt subroutine and the
information (error code and line number) can be used for error processing.
Remarks:
Note:
1.
ERR
will have a default value of 0 if no error has occurred.
2.
When an error occurs, the flow of the program can be controlled by using the
ERR
function in an interrupt subroutine.
Examples:
>
10 ON ERROR GOTO 1000
>
20 A=A/0
>
30 END
>
1000 PRINT "ERROR #";ERR;" OCCURRED AT LINE ";ERL
>
1010 END
>
RUN
ERROR #11 OCCURRED AT LINE 20
See also:
ERC
,
ERL
Содержание C200H-ASC11
Страница 1: ...C200H ASC11 ASC21 ASC31 ASCII Units Operation Manual Revised June 2000...
Страница 2: ...iv...
Страница 4: ...vi...