Chapter
3:
Programming
the
VIC
20 Computer 87
column. Two DATA statements, each with a list
of
five
data items, would
build exactly the same column. This may
be
illustrated as follows:
10
DATA
10,20,30,40,50,60,70,80,90,100
First column entr
y
-{
10
20
I
30
40
50
{
60
I
...-.--..
10
DATA
10,
20,
30,
40,
50
20
DATA 60,
70,
80,
90,
100
'-,
V"
~
.,/
70
2
80
90
100
~
Last column entry
2
The first READ statement executed in a program starts
at
the first
column entry, assigning each value to corresponding variables named in the
READ statement. The second and subsequent READ statements take
values from the column, starting
at
the point where the previous READ
statement left off. This may be illustrated as follows:
10
DATA
10,20,30,40,50,60,70,80,90,100
·
10
·
{w
·
/30
·
A=lO
40
220
READ A,
B,
C B =
20
/it
50
·
~
/C=30
{60
·
~
70
80
C=4O
90
~4O
READ
~
/ D =
50
100
·
~
A=60
·
E=
70
:
~F:,80
490
READ A,
E,
F, G
G-
90
500
READ B
~B=IOO