EasyManua.ls Logo

Commodore VIC-20 - Page 102

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...
88 The VIC 20
User
Guide
RESTORE
STATEMENT
You can
at
any time send the pointer back to the beginning
of
the
numeric column by executing a
RESTORE
statement. Here
is
an
example
of
the use
of
RESTORE.
10
DATA
10,
20,
30,
40,
50,
60,
70,
80,
90,
100
A=
10
220
READ
A,
B,
C B =
20
____
:
~C=30---
~C=40
~
D=50
340
READ
C,
D
350
RESTORE
---------1'"'"""
A=
10
:
.....---..E=
20
-<--
F=30
490
READ
A,
E,
F, G
G=
40
500
READ B
'-------
B =
50----
Dimension
Statement
10
20
30
40
50
60
70
80
90
100
VIC BASIC normally assumes that a variable has a single dimension,
with index values
of
0 through
10.
This generates an 1 I-element array.
If
you
want a single dimension with more
or
less
than
11
elements, then you must
include the array variable in a dimension (DIM) statement. You also must
include the array in a dimension statement if it has two
or
more dimensions,
no matter what number
of
elements the array has. The following example
provides dimensions for one-dimension array variables MP$, FV$, and
DP$.
We
used these variables in our earlier discussion
of
arrays.
DIM
MPS(5),FV'(3),DP'(2)

Other manuals for Commodore VIC-20

Related product manuals