EasyManua.ls Logo

Commodore VIC-20 - Page 109

Commodore VIC-20
404 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter
3:
Programming the
VIC
20
Computer
95
50
FOR
I-I
TO
10
60
FOR
X-25
TO
347
STEP
3
·
100
FOR
A=9
TO
0
STEP
-1
·
140
NEXT
A
200
FOR
B-25
TO
100
STEP
5
·
280
NEXT
B
300
NEXT
X
·
500
FOR
Y=l
TO
20
STEP
2
·
600
FOR
P=10
TO
20
·
650
NEXT
P
700
NEXT
Y
1000
FO~
2=1
TO
10
·
1090
NEXT
2
1200
NEXT
I
The outermost loop uses index I; it contains three nested loops
that
use
indexes X,
Y,
and
Z. The first loop contains two additional loops which use
indexes A
and
B.
The second loop contains one nested loop using index P.
The third loop contains no nested loops. Each nested loop must have a dif-
ferent index variable name. Statement execution sequences may be illus-
trated as follows:
TO
lee
STEP
!5

Other manuals for Commodore VIC-20

Related product manuals