EasyManuals Logo

Sharp MZ-800 User Manual

Sharp MZ-800
221 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #144 background imageLoading...
Page #144 background image
6.8
Error
Processing
Statements
ON
ERROR
GOTO
Format
ON
ERROR
GOTO
Bese
number
>
<label>
Explanation
Example
Abbreviated
Format
ON
ERR.
G.
2
The
ON
ERROR
GOTO
statement
causes
program
execution
to
branch
to
<line
number>
or
<label>
if
an
error
occurs.
The
ERN
or
ERL
system
variable
can
be
used
in
a
trap
routine
starting
at
that
line
to
control
subsequent
processing
ac-
cording
to
the
type
of
error
and
the
line
number
in
which
it
occurred.
Including
a
RESUME
statement
at
the
end
of
the
error
processing
routine
makes
it
possible
to
return
execution
to
the
line
at
which
the
error
occurred.
Executing
an
ON
ER-
ROR
GOTO
statement
cancels
the
error
trap
line
number
defined
by
the
previous
ON
ERROR
GOTO
statement.
The
error
trap
line
number
definition
is
also
can-
celled
by
executing
a
CLR
statement.
10
ON
ERROR
GOTO
100
20
INPUT
“*X="";X
30
PRINT
SQR(X)
40
END
100
PRINT
“‘ERROR’’
110
RESUME
20
The
program
above
displays
the
message
“ERROR”
and
returns
to
line
20
if
an
error
occurs.
6-87
_

Other manuals for Sharp MZ-800

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Sharp MZ-800 and is the answer not in the manual?

Sharp MZ-800 Specifications

General IconGeneral
BrandSharp
ModelMZ-800
CategoryDesktop
LanguageEnglish

Related product manuals