Commodore 16 User Manual
Download Operation & user’s manual of Commodore 16 Desktop for Free or View it Online on All-Guides.com.
Other Functions
FRF.
(X)
This
function returns the number ot unused
bytes
available in memory,
X is a
Gummy
argument.
POS (X)
This function returns
the number of the column
(0-39) where the next
PRINT staiement begins
on the screen
X
Is
a dummy
argument.
SPC(X)
This is
used
in
the PRINT staiement to skip over X
spaces. X can have
a
value trom 0-255
TAB
(X)
This is
used
in the PRINT
statement. The next item to be printed is in
column number
X. X
can
have
a
value from
to 255.
TT
(PI)
The pi
symbol, when
used
in an equation,
has the value ol
3.1 41
59265,
VARIABLES
& OPERATORS
Variables
Your
Commodore 16
uses
three
lypes
ol
variables
in
BASIC. These
are: normal numeric, Integer numeric, and string (alphanumeric)
variables.
i
i
i
l
l
(
(
I
i
I
I
I
(
[
!
[
Normal NUMERIC
VARIABLES, also called floating point variables.
can have any value Irom
30
to
*
M
, with
up to
nine digits of accuracy.
When
a
number becomes larger than nine
digits
can show, as In
10'
,0
or 10
*'°
,
your computer
displays
It In
scientific notation form,
wilh the
number normalized
to 1
digit and eighl decimal places,
followed
by
the letter
E
and the power
ot
ten by
which
the
number
is
multiplied. For example, the
number 1 2345678901 is displayed
as
1.234356789E + 10.
INTEGER VARIABLES can be used when
the number Is trom +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
po«nt variables when used in an array.
STRING
VARIABLES
are
those used
for character data, which may
contain numbers, letters, and any other character that your
Commodore
1
6 can make. An
example of
a
string
variable
is "COMMODORE 1
6".
VARIABLE NAMES
Variable names
may
consist ol
a
single letter,
a
letter followed
by a
number,
or two
letters Variable names
may be
longer than
2
traders,
but
only the first
Iwo
are significant
An integer variable
is specified
by
using the percent
f
%)
sign after the
variable name. String vanaoles 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. BZ$
ARRAYS
are
lists ot variables
with
the same
name, using an extra
number (or numrjets) to specify an element ot tne array. Arrays
are
defined using the DIM statement, and may be floating point,
integer,
or
string variables arrays.
The
array variable name <s
followed
by a set
of
parentheses
(
}
enclosing the number of the
variable
in the
list
I
I
153