EasyManuals Logo
Home>Atari>Desktop>800

Atari 800 Basic Reference Manual

Atari 800
122 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 #30 background imageLoading...
Page #30 background image
TRAP
(T.)
22
Program
Stateme
nt
s
and
B,
because
of
the
RESTORE
statement,
will
still
equal
30.
Therefore,
the
PRINT
statement
in
line
50
will
display
SUM
TOTAL
EQUALS
45.
Format:
Example:
TRAP
aexp
100 TRAP 120
The
TRAP
statement
is
used
to
direct
the
program
to
a
specified
line
number
if
an
error
is
detected
.
Without
a TRAP
statement,
the
program
stops
executing
when
an
error
is
encountered
and
displays
an
error
message
on
the
screen.
The
TRAP
statement
works
on
any
error
that
may
occur
after
it
has
been
ex-
ecuted,
but
once
an
error
has
been
detected
and
trapped,
it
is
necessary
to
reset
the
trap
with
another
TRAP
command.
This
TRAP
command
may
be
placed
at
the
beginning
of
the
section
of
code
that
handles
input
from
the
keyboard
so
that
the
TRAP
is
reset
after
each
error.
PEEK(195)
will
give
you
an
error
message
(see
Appendix
B).
256
*PEEK(187)+ PEEK(186)
will
give
you
the
number
of
the
line
where
the
error
occurred.
The
TRAP
may
be
cleared
by
executing
a
TRAP
statement
with
an
aexp
whose
value
is
from
32767
to
65535 (e.g., 40000).

Table of Contents

Other manuals for Atari 800

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Atari 800 and is the answer not in the manual?

Atari 800 Specifications

General IconGeneral
BrandAtari
Model800
CategoryDesktop
LanguageEnglish

Related product manuals