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 #41 background imageLoading...
Page #41 background image
CHAPTER 5
PROGRAM CONTROL
In
the
last
chapter
we
defined
a
program
as
a-
numbered
list
of
instructions
to
the
computer,
which
are
obeyed
in
order
from
beginning
to
end.
In
this
chapter
we
will
find
out
how
to
write
programs
in
which
some
instructions
are
executed
more
than
once.
This
makes
programs
more
efficient,
as
instructions
which
must
be
repeated
need
to be
written
only
once.
We
will
also
discover
that
the
computer
can
make
decisions.
REPETITION
A
section
of
program
can
be
repeated
many
times
using
the
instructions
FOR
and
NEXT.
Try
this
example:
10
FOR
COUNT
= 1
TO
10
20 PRINT
COUNT
30
NEXT
COUNT
which
prints
the
numbers
from
1 to 10 on
the
screen.
The
section
of
program
between
the
FO
R
and
the
NEXT
commands
is
repeated
for
each
value
of
COUNT,
and
COUNT
is
automatically
increased
by
one
every
time
the
NEXT
command
is
met
in
a loop. .
The
variable
in
a
FO
R ...
NE
XT
loop
need
not
be
increased
by 1;
any
increase
or
decrease
can
be
31

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