EasyManuals Logo

Atari 800 User Manual

Atari 800
326 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 #118 background imageLoading...
Page #118 background image
116 User's
Handbook
to
the Atari 400/800 Computers
FOR
(F.)
CONFIGURATION
X =
EXP(a)
EXAMPLE
PRINT
EXP(5)
148.413155
A
FOR
statement
is
used
with
a
NEXT
statement to
form
a
repetitive
loop
within
a program.
CONFIGURATION
FOR
A = a
TO
b
[STEP
c]
Every
FOR
statement
must
have a
corresponding
NEXT
statement.
EXAMPLE
10
FOR
I = 1
TO
5
20 PRINT I;
30
NEXT
I
RUN
12345
In the previous example, the
FOR
/
NEXT
loop
is
repeated five
ti
mes
o Line 20
is
the on
Iy
stateme
nt
inside the
loop
,
however,
any
number
of
program
lines can be placed
within
a loop.
In line
10,
I
is
assigned the value 1. I
is
referred
to
as
a
counter.
The value
of
I
is
incremented
where a
NEXT
I statement
is
executed. Here, the program returns
to
the FOR statement,
where
I
is
incremented
by one. This
loop
is
repeated
until
I
is
set
equal
to
5.
When
the
counter
(I)
has
been set equal
to
the
value
(5), the
loop
has
been executed, the program
will
proceed
with
the statement
following
NEXT
I.

Other manuals for Atari 800

Questions and Answers:

Question and Answer IconNeed help?

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

Atari 800 Specifications

General IconGeneral
ProcessorMOS Technology 6502
Processor Speed1.79 MHz
ROM10 KB
GraphicsANTIC and GTIA chips
Release Year1979
Display Resolutionup to 320 x 192
Colors128 colors
Sound4 channels
StorageCartridge, cassette, floppy disk
PortsCartridge, serial, monitor
Operating SystemAtari OS

Related product manuals