Sharp MZ-700 Series Owner's Manual page 99

Personal computer
Hide thumbs Also See for MZ-700 Series:
Table of Contents

Advertisement

2.10.3 IFERL
Format
Function
Example
IF relational expression using ERL THEN
Lr
IF relational expression using ERL THEN
statement
IF relational expression using ERL GOTO Lr
Lr . . . . Destination line number
This statement branches execution to the routine starting at line Lr or executes the
statement following THEN when the result of Crelational expression using E R L >
is true.
ERL is a special function which returns the line number at which an error occurred.
The following statement causes execution to branch to line 1300 if an error has
occurred on line 250.
1010 IF ERL = 250 THEN 1300
The following statement returns control to line 520 in the main routine if the error
number is 43 and the error line number is other then 450.
1020 IF (ERN = 43) X (ERL < > 4 5 0 ) THEN RESUME 520
2.10.4 RESUME
(Abbreviated format: RESU.)
RESUME
< N E X T >
RESUME
Lr
Lr . . . . Line number or 0
This statement returns control to the main routine from an error processing routine.
The system holds the number of the line on which the error occurred in memory
and returns program execution to that line or to another specified line after the
error is corrected.
The RESUME statement may be used in any of the following four forms:
R E S U M E
Returns to the error line.
R E S U M E
N E X T
Returns to the line following the error line.
R E S U M E
L r
Returns to line Lr.
R E S U M E
0
Returns to the beginning of the main routine.
If the RESUME is encountered when no error has occurred, error 21 (RESUME
ERROR) occurs.
If the RESUME cannot be executed, error 20 (CAN'T RESUME ERROR) occurs.
2.10.5 SIZE
PRINT SIZE
This is a special function which returns the number of bytes in memory which can
be used for storage of BASIC programs.
For example, PRINT SIZE displays the number of free bytes of memory area.
Format
Function
97-

Advertisement

Table of Contents
loading

Table of Contents