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 #53 background imageLoading...
Page #53 background image
DECISIONS
Program
Control
43
IF
(condition)
THEN
(instruction)
decides
between
two
actions.
The
condition
after
If'
is
usually
a
test
of
a
variable.
There
may
be
more
than
one
instruction
after
THEN,
in
which
case
colons
(:)
must
be
used
to
separate
them.
The
complete
IF
...
THEN
command
must
be
in
one
line.
GOTO
need
not
be
included
if
it
would
be
the
only
command
after
THEN,
but
it
must
be
if
there
is
another
command
before it:
100
IF
ACE
1
THEN
20
but
100
IF
ACE
2
THEN
KING
7:GOTO
20
SUBROUTINES
Diversions
from
a
program,
using
the
commands
GOSUB
and
RETURN.
GOSUB
calls
the
subroutine,
and
RETURN
at
the
end
of
the
subroutine
returns
the
computer
to
the
instruction
after
the
GOSUB.
ON
...
GOSUB
and
ON
...
GOTO
Select
a
destination
from a
list:
ON
P
GOSUB
X, Y, Z
causes
a
GOSUB
to
the
P'th
item
in
the
list.
ON
N
GOTO
A, B, C
This
causes
a
jump
to
the
N'th
destination
-
if
there
is
an
N'th
item
in
the
list.
END
halts
the
running
of
a
program.

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