EasyManuals Logo
Home>Atari>Desktop>130XE

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 #66 background imageLoading...
Page #66 background image
The computer can count backward
in
increments also:
HI
FOR
JKL=500
TO
0
STEP
-20
RUN
1.0
FOR
JKL=500
TO
0
STEP
-3
RUN
1.0
FOR
JKL=0
TO
-500
STEP
-50
RUN
You can also instruct the computer to start and stop at any number
you desire:
1.0
FOR
JKL=500
TO
300
STEP
-1.0
RUN
1.0
FOR
JKL=25
TO
0
STEP
-1.
RUN
Now you know how to instruct the computer to count forward and
backward, to count
consecutively and incrementally, and to start and
stop at specified numbers.
The FOR·NEXT "Sandwich" Loop
List your program.
FOR
is
on
the top line, and NEXT
is
on
the bottom
line. Whatever you want the computer to do is sandwiched
in
between.
Type
in
the lines below:
1.0
FOR
JKL=1.
TO
5
20
PRINT"
AVOCADO"
The computer will carry out any
in
struct
ion or number of instructions
between the
FOR
and NEXT statements the specified number of times.
Have the computer print other words:
1.6
PRINT
"CHEESE"
1.
7
PRINT"
MAVONNAISE"
1.8
PRINT
"MUSTARD"
1.
~
PRINT"
TOMATO"
21.
PRINT
"BACON
BITS"
22
PRINT
"LETTUCE"
23
PRINT:
PRINT
RUN
The computer prints and counts too quickly for anyone to read the
screen
clearly. Nonetheless, it prints the PRINT statement exactly five
times
as
instructed
in
the FOR-NEXT statement. Other instructions,
such
as
math computations and INPUT statement
s,
can also be part
of the FOR-NE
XT
sandwich loop.
60

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
BrandAtari
Model130XE
CategoryDesktop
LanguageEnglish

Related product manuals