EasyManua.ls Logo

Apple IIe - Page 129

Apple IIe
320 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Apple
BASIC
Reference
Guide
129
80
PRINT
"YOU
ENTERED
A
TWO"
90
GOTO
130
100 PRINT
"YOU
ENTERED
A THREE"
110
GOTO
130
120
PRINT
"YOU
ENTERED
A
FOUR"
130
END
In
the
preceding
example
,
line
10
prompts
the
user
to
enter
a
number
between
one
and
four.
In
line
20,
an
ON
...
GOTO
will
branch
control
to
a
different
line
depending
on
the
value
of
I.
If
I
is
one,
program
execution
will
branch
to
60.
If
I
is
two
,
program
execution
will
branch
to
80,
etc.
If
zero
or
a
number
greater
than
four
was
entered
,
program
execution
will
continue
to
line
30.
ONERR
GOTO
Applesoft
o
Integer
The
ON
ERR
statement
allows
errors
to
be
trapped.
The
statement
then
transfers
program
control
to
an
error
handling
routine
at
the
indicated
line
number
.
Configuration
ONERR
GOTO
line
line
is
the
first
line
of
the
error
handling
routine.
ON
ERR
GOTO
should
be
executed
before
the
error
has
occurred.
When
Applesoft
executes a
program
,
it
executes
the
program
line
by
line.
If
an
error
occurs
during
program
execution
,
Applesoft
will
check
to
see
if
an
ONERR
GOTO
statement
has
been
executed.
If
no
ONERR
GOTO
statement
had
been
executed
,
Applesoft
will
halt
program
execution
and
display
the
error.
Otherwise
the
program
will
branch
to
the
line
i
nd
icated
in
I
the
ONERR
GOTO
statement
.
POKE
216
,0
turns
off
any
previously
executed
ONERR
GOTO
statement.

Other manuals for Apple IIe

Related product manuals