66 The VIC 20
User
Guide
VARIABLE
NAMES
Variable names can be used
to
represent string
data
or
numeric data.
If
you have studied elementary algebra, you will have no trouble under-
standing the concept
of
variables and variable names.
If
you have never
studied algebra, then think
of
a variable name as a name that
is
assigned to a
mailbox. Anything
that
is
placed in the mailbox becomes the value asso-
ciated with the mailbox name.
A variable name can have one, two,
or
three characters. The following
character options are allowed:
itHU~
I t Thin!
,h".,,,,,
mm'
be
Sf.,.
"ring
variab".'
% for
an
integer variable. A floating point
variable name
can
only have two characters.
Second character can be
any
unshifted letter
(A to Z)
or
any numeric digit (1, 2, 3, 4, 5, 6, 7, 8, 9, 0)
for any type
of
variable.
L..-
__
First character must be
an
unshifted letter
(A
to
Z) for
any
type
of
variable.
Thus the last character
of
the variable name tells VIC BASIC which
type of data the variable represents.
Note that unshifted letters are used for the first and second label
characters. Unshifted letters may be upper-case
or
lower-case. Either way,
they are the letters displayed when the
SHIFT key
is
not being depressed.
Floating point variables are the ones most frequently used in VIC
BASIC. Here are some examples of floating point variable names,
A
B
C
Al
AA
Z5
integer variable names,
A%
B%
C%
AI%
MN%
X4%