64 The VIC 20
User
Guide
computer, integer numbers must have values in the range
-32768
to
+32767.
o
1
44
32699
-15
Any integer can also be represented as a floating point number, since
integers are a subset
of
floating point numbers. VIC BASIC automatically
converts integer numbers to floating point before using them in arithmetic.
STRINGS
The word string
is
used to describe
data
that
consists
of
characters. This
can be anything
that
is
not interpreted as a number.
We
have already used strings as messages to be displayed on the VIC's
screen. A string consists
of
one
or
more characters enclosed in double
quotation marks.
"HI!"
"SYNERGY"
"12345"
"$10.44 IS
THE
AMOUNT"
"22 UNION SQUARE, SAN FRANCISCO, CA"
Within a string you can include any alphabetic
or
numeric characters,
special symbols
or
graphic characters, cursor control characters
(CLR/
HOME,
CRSR
UP
/ DOWN,
CRSR
LEFT/RIG
HT), and the RVS ON /
OFF
key. The
only keys that cannot be used within a string are
RUN / STOP, RETURN, and
INST/DEL.
All characters within the string are displayed as they appear. The cursor
control, color control, and
RVS
ON/OFF
keys, however, normally do not
print anything themselves.
To
show
that
they are present in a string, certain
reverse field symbols 'are used, as shown in Table 3-1.
Strings are entered as
part
of
a statement. A statement must fit within
an 88-character line, so the longest string you can enter
at
the keyboard will
have less than
88
characters, since there must be room for the line number.
Strings
of
up to
255
characters can be stored in memory. Long strings
are generated by concatenation, the joining together
of
shorter strings. This
will be explained later in this chapter.