Commodore PET User Manual page 73

Table of Contents

Advertisement

for floatlng pOint variable
for Integer variable
for string variable
$
two, or three characters, as follows:
[tf}]
Ma.ndator
v
first
character~
~l{A-Z)]
A-Z
f
0-9
Optlonal second character
~
Variable type
(blank)
%
A variable name can have one,
A-Z means that
VOU
can select any letter of the alphabet
AB,
C, . .
X,
y, Z,
and
0-9
means that vou can select any digit
0, 1, 2, 3, 4, 5, 6, 7, 8,
or
9.
Floating Point Variable
A floating point variable is a variable that represents a floating point num-
ber This is probably the most common type of variable that vou will use in PET
BASIC,
Names for floating point variables have the form
A-Z
[{~~~}]
Examples:
A
B
C
Al
AA
Z5
Integer Variable
An integer variable is a variable that represents an integer
Names for integer variables have the form:
A-Z
({~~n]
%
Examples:
A%
B%
C%
Al%
MN%
X4%
Remember,
f10ating point variables can also represent integers: but you
should use integer variables in arrays whenever possible. since they use less
memory -
two bytes, versus five for a floating point array element
60

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cbm

Table of Contents