Sharp OZ-707 Operation Manual - Page 71

Sharp OZ-707 - Scientific Rom Card Manual

Page 71 highlights

ERL p o FORMAT: ERL Abbreviation: See Also: ERN, ON ERROR GOTO PURPOSE: Returns the line number at which an error occurred during program execution. REMARKS: The ERL function is used with the ERN function and the ON ERROR GOTO statement in error processing routines to control program flow when an error occurs. A line number is only set in ERL if the error occurred during program execution. ERL will be cleared when • a RUN statement is executed. • the power is turned off. • a program is loaded. ERN P D FORMAT: ERN Abbreviation: See Also: ERL, ON ERROR GOTO PURPOSE: Returns the error code number of the execution error. REMARKS: The ERN function is used with the ERL function and the ON ERROR GOTO statement in error processing routines to control program flow when an error occurs. See Appendix A for a list of error messages. ERN will be cleared when • a RUN statement is executed. • the power is turned off. • a program is loaded. EXAMPLE: 10: ON ERROR GOTO 100:WAIT 20: FOR N = 1 TO 20 30: READ A 40: PRINT A 50: NEXT N 60: END 100: IF ERL = 30 AND ERN = 53 THEN PRINT "YOU HAVE NO DATA" 130 131

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128

ERL
FORMAT:
ERL
Abbreviation:
See
Also:
ERN, ON ERROR GOTO
PURPOSE:
Returns the line number at which
an
error occurred during program
execution.
REMARKS:
The ERL function is used with the ERN function and the
ON
ERROR
GOTO statement
in
error processing routines to control program flow
when an error occurs. A line number is only set
in
ERL if the error
occurred during program execution.
ERL will be cleared when
• a RUN statement is executed.
• the power is turned off.
• a program is loaded.
130
p
o
E
RN
FORMAT:
ERN
Abbreviation:
See
Also:
ERL, ON ERROR GOTO
PURPOSE:
Returns the error code number of the execution error.
REMARKS:
The ERN function is used with the ERL function and the ON ERROR
GOTO statement
in
error processing routines to control program flow
when an error occurs.
See Appendix A for a list of error messages.
ERN will
be
cleared when
• a RUN statement is executed.
• the power is turned off.
• a program is loaded.
EXAMPLE:
10
:
ON
ERROR GOTO 100:WAIT
20
:
FOR
N
=
1 TO
20
30: READ A
40: PRINT A
50
: NEXT N
60:
END
100
:
IF
ERL
=
30 AND
ERN
=
53 THEN PRINT "YOU HAVE
NO
DATA"
131
P
D