Commodore VIC-20 Programmer's Reference Manual page 73

Hide thumbs Also See for VIC-20:
Table of Contents

Advertisement

READY.
An integer is a number that has no fractional portion or decimal
point. The number can be signed negative (-) or positive (+). An
unsigned number is assumed to be positive. Integer numbers have
a limited range of values, from -32768 to + 32767.
The following are examples of integers:
0
1
44
32699
-15
Any number that is an integer can also be represented in floating
point format since integers are a subset of floating point numbers.
VIC BASIC converts any integers to floating point representation
before doing arithmetic with them. The most important difference
between floating point numbers and integers is that an integer array
uses less storage space in memory (two bytes for an integer,
versus five bytes for a floating point number).
We have already used strings as messages to be printed on the
display screen. A string consists of one or more characters
enclosed in double quotation marks.
Consider the following examples of strings:
■'HI"
"SYNERGY"
" 12345"
■$10.89 IS THE AMOUNT"
All of the data keys (alphabetic, numeric, special symbols, and
graphics), the three cursor control keys (Clear Screen/Home,
Cursor Up/Down, Cursor Left/Right), as well as the Reverse On/Off
key, Insert/Delete, and Stop keys can be included in a string. The
only keys that cannot be used within a siring are Return, CTRL,
Shift, and the Logo key.
All characters within the string are displayed as they appear. The
cursor control and Reverse 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. They are shown in Table
2-1.
When you enter a string from the keyboard, it can have any
length up to the space available within an 88-character line (that is,
any character spaces not taken up by the line number and other
required parts of the statement). However, strings of up to 255
characters can be stored in the VIC's memory. You get long strings
57

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents