EasyManuals Logo

Atari 130XE User Manual

Atari 130XE
142 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 #64 background imageLoading...
Page #64 background image
NEW
1.9
FOR
K=1.
TO
4
29
PRINT
"POTATO"
39
NEKT
K
RUN
POTATO
appears
on
the screen four times. Change line 10 to read like
this:
1.9
FOR
K=1.
TO
7
When you run the program this time, the screen shows POTATO seven
times. The computer is looping seven times through lines
10,
20,
and
30.
FOR
tells
th
e computer how many times to loop, and NEXT tells
the computer to go back to the top and start again. NEXT is similar to
GOTO.
X
is
a variable. You can use anything to represent the variable.
Try this name for the variable:
1.9
FOR
NUH=1.
TO
7
39
NEKT
NUH
When you run the program, there is
no
difference from the previous
program. Change the variable name again:
1.9
FOR
JKL=1.
TO
7
39
NEKT
JKL
JKL
is
a nonsense name for the numeric variable
in
the FOR-NEXT
loop.
Run
the program to see that it, too, runs the same as before.
Now add this lin
e:
1.5
PRINT
JKL
..
RUN
The PRINT statement
in
line
15
shows the
va
lue of the variable. (Put
the comma
in
for readability
.)
Each time the computer repeats the
FOR-NEXT loop, the variable takes
on
the value of the
ne
xt number
in
the series specified
in
line
10.
The first time, the variable is 1;
th
e
second time,
2;
and so on. The last number
in
the
FOR
statement
controls the number of times the computer loops through the program.
Change that number in line
10
as
shown below:
1.9
FOR
JKL=1.
TO
59
RUN
1.9
FOR
JKL=1.
TO
299
RUN
1.0
FOR
JKL=1.
TO
509
RUN
58

Table of Contents

Other manuals for Atari 130XE

Questions and Answers:

Question and Answer IconNeed help?

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

Atari 130XE Specifications

General IconGeneral
TypeHome computer
Release year1985
CPUMOS Technology 6502C
CPU Speed1.79 MHz
RAM128 KB
ROM24 KB
GraphicsANTIC and GTIA chips
ManufacturerAtari
Display resolution320x192
SoundPOKEY chip, 4 channels
StorageExternal floppy disk drive, cassette tape
Ports2 joystick ports
Operating SystemAtari BASIC

Related product manuals