EasyManuals Logo
Home>Atari>Desktop>XL

Atari XL User Manual

Atari XL
262 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 #52 background imageLoading...
Page #52 background image
42
GOTO
100
GOTO
200
GOTO
300
Similarly:
The
Ateri
XL
Handbook
ifN
= 1
ifN
= 2
ifN
= 3
ON
P
GOSUB
500,200,500,400,100
selects
the
P'th
destination
in
the
list
and
calls
it
as
a
subroutine.
If
the
value
of
the
variable
is
greater
than
the
number
of
destinations
in
the
list,
or
if
it
is
zero, no
destination
is
selected
and
the
program
continues
at
the
next
instruction.
If
the
value
is
less
then
zero,
the
program
stops
with
the
error
message
(ERROR - 3'. To avoid
this,
make
sure
you
only
use
positive
values
by
testing
them
first.
For
example,
instead
of:
250
ON
NUM
GOTO
1000,
2000,
3000
write:
250
TEST=NUM
260
IF
TEST<O
THEN
TEST=O
270
ON
TEST
GO
TO
1000,
2000,
3000
SUMMARY
LOOPS
The
loop
structure
has
the
form:
FOR
V = A
TO
B
STEP
C ...
NEXT
in
which
the
instructions
between
the
FO
R
and
NEXT
commands
are
repeated
once for
each
value
of V
indicated
by
the
FOR
...
STEP
command.
A,
Band
C
may
be
variables
or
numbers;
V
must
be a
variable.
Loops
may
be
nested
one
within
another.

Questions and Answers:

Question and Answer IconNeed help?

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

Atari XL Specifications

General IconGeneral
BrandAtari
ModelXL
CategoryDesktop
LanguageEnglish

Related product manuals