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 #44 background imageLoading...
Page #44 background image
34
The
Ateri
XL
Handbook
JUMPS
The
computer
can
be
instructed
to
jump
from
one
program
line
to
another
using
the
command
GOTO.
Enter
this
program:
10
GOTO
30
20 PRINT
"LINE
20"
30
PRINT
"LINE
30"
When
it
is
RUN
the
message
(LINE 20' is
not
seen
because
the
GOTO
instruction
in
line
10
sends
the
XL
straight
to
line
30.
The
jump
can
be to a
lower
numbered
line.
The
following
program
will
go on for
ever,
unless
you
stop
it
by
pressing
the
BREAK
key:
10
PRINT "ON
AND
";
20
GOTO
10
This
is
called
an
endless
loop,
and
is
to be avoided!
DECISIONS
The
commands
IF
and
THEN
are
used
in
programs
to
make
decisions. A
variable
is
tested,
and
one
of
two
alternative
actions
is
taken,
depending
on
the
result
of
the
test.
10
FOR
X = 1
TO
10
20 PRINT X
30
IF
X = 5
THEN
PRINT "X = 5"
40
FOR
P = 0
TO
200
:
NEXT
P
50
NEXT
X
The
format
of
IF
...
T-HEN
is:
IF
(condition)
THE
N
(instructions)

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