EasyManua.ls Logo

Commodore CBM - PET Key Groups

Commodore CBM
447 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...
Variables
Under some circumstances the BASIC interpreter
will
treat a keystroke
as
part of a BASIC statement. Or the keystroke may become part of a
"symbol"
or
variable name.
We
use the
word
"syntax"
to describe the rules governing the
form that BASIC statements must have and the way characters
within
the BASIC
statement
will
be
interpreted.
7T
is
a
"symbol";
it
represents the value 3.14159265, the circumference of a
circle divided by its radius.
The concept of a
"symbol"
or
"variable"
is
fundamental to ail computer pro-
grams,
whether
they are
written
in BASIC or in any other programming language.
You create variable names by grouping letters
and/or
other characters, according
to specified rules. Each variable becomes an entity, capable of representing infor-
mation. The information may
be
a number or a word of text. You may liken varia-
bles to letter boxes, each of
which
has
a
na
me,
but
can contain whatever vou
choose to
put
into it.
The information represented by a variable name may
be
a string of text.
an
integer, or a floating point (real) number. If the last character of the variable
na
me
is
%,
the variable can represent only integers. If the last character of the label
is
$,
the label can represent only strings. If the last character of the label
is
neither %
nor
$,
then the label can represent only floating point numbers.
Until a program assigns a value to a variable
na
me,
the variable
is
assumed
to have a value of 0 for a number, or no characters at ail for a string.
PET KEY GROUPS
The
PET
keys can
be
divided into the
following
groups:
Alphabetic keys
Numeric keys
Special symbols
Graphie keys
Function keys
Cursor control keys
15

Table of Contents

Other manuals for Commodore CBM

Related product manuals