EasyManua.ls Logo

Commodore Plus 4 - Page 173

Commodore Plus 4
234 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
&
OPERATORS
Tne
plus/4
uses
three
types
of
variables
in
BASIC.
These
are:
normal
numeric,
integer
numeric,
and
string
(alphanumeric)
variables.
Normal
NUMERIC
VARIABLES,
also called
floating
point
variables.
Variables
can
nave
anY
value
from
3ato
~3B,
with
up
to
nine
digits
of
accuracy.
When
a
number
becomes
larger
than
nine
digits
can
show,
as
in
N
~10
or
N10,
the
computer
displays
it
in
scientific
notation
form,
with
the
number
normalized
to
1
digit
and
eight
decimal
places,
followed
by
the
letter
E
and
the
power
of
ten
by
which
the
number
is
multiplied.
For
example,
the
number
12345678901
is
displayed
as
1.234356789E+10.
INTEGER
VARIABLES
can
be
used
when
the
number
is
from
+32767
to
-32768,
and
with
no
fractional
portion.
An
integer
variable
is
a
number
like
5,
10,
or
-100.
Integers
take
up
less
space
than
floating
point variables,
particularly
when
used
in
an
array.
STRING
VARIABLES
are
those
used
for
character
data,
which
may
contain
numbers,
letters,
and
any
other
character
that
the
Plus/4
can
make
An
example
of
a
string
variable
is
"Plus/4".
Variablfi
Var|able
names
may
consist
of
a
single
letter,
a
letter
folowed
by a
Names
num':)er-
or
two
letters.
Variable
names
may
be
longer
than
2
charac
ters,
but only the
first
two
are
significant.
An
integer
variable
is
specified
by
using
the
percent
{%)
sign
after
the
variable
name.
String
variables
have
the
dollar
sign
(S)
after
their
names.
EXAMPLES:
Numeric
Variable
Names:
A.
A5,
BZ
Integer
Variable
Names:
A%, A5%.
BZ%
String
Variable
Names:
AS.
A5S,
BZS
ARRAYS
are
lists
of
variables
with
the
same
name,
using
an
extra
number
(or
numbers)
to
specify
an
element
of
the
array.
Arrays
are
defined
using
the
DIM
statement,
and
may
be
floating
point,
integer,
or
string
variables
arrays.
The
array variable
name
is
followed
by
a
set
of
parentheses
()
enclosing
the
number
of
the variable
in
ihe
list.
EXAMPLES:
A(7),BZ%(11),A$(87)
Arrays
may
have
more
than
one
dimension.
A
two
dimensional
array

Other manuals for Commodore Plus 4

Related product manuals