EasyManua.ls Logo

Commodore Plus 4 - Page 41

Commodore Plus 4
464 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...
BASIC
Version
3.5
Commands,
Functions,
and
System
Variables
29
Abbr.
none
COS
COS
(number)
COS
is
the
numeric
function
that
finds
the
cosine
of
the
angle
in
parentheses.
The
angle
must
be
expressed
in
radians.
For
more
information,
see
the
Mathe
matical
Calculations
section
of
Chapter
3.
Parameter:
any
number
or
numeric
expression
Examples:
PRINT
COS(
tt)
-1
PRINT
C0S(30*7r/180)
.866025404
DATA
DATA
data
list
Prints
the
cosine
of
an
angle
of
n
radians
(180
degrees).
Prints
the
cosine
of
an
angle
of
30
degrees.
Abbr.
dA
Contains
a
list
of
values
that
are available
for
assignment
to
variables
by
READ
commands.
DATA
commands
are
complements
to
READ
commands;
neither
command
works
without
the
other.
DATA
items
can
be
either
numbers
or
text.
Text
data
does
not
need
to
be
enclosed
in
quotes
unless
it
includes
an
embedded
comma
or
colon,
although
the
text
items
are
treated
as
if
they
were
in
quotes.
Since
DATA
commands
always
contain
constant
values,
not
variable
names,
the
computer
assumes
that
any
nonnumeric
DATA
item
is
text.
DATA
commands
can
contain
any
number
of
values
as
long
as
the
list is
no
longer
than
88
characters
on
the
screen.
READ
commands
can
get
data
from
DATA
commands
anywhere
in
the
program.
You
must
have
enough
DATA
values
in
a
program
to
assign
a
value
to
every
variable
in
the
READ
commands
that
are
executed
in
the
program.
If
there
are
not
enough
DATA
values,
the
program
is
aborted
and
the
error
message
OUT
OF
DATA
is
displayed.
When
DATA
items
are
READ,
the
computer
keeps
track
of
the
last
value
read
by
marking
its
place
with
a
data
pointer.
You
can
reREAD
DATA
items
by
using
the
RESTORE
command,
which
resets
the
data
pointer
to
the
beginning
of
a
DATA
command.
Parameter:
list
of
data
values
separated
by
commas
Example:
DATA
items
must
be
separated
by
commas.
Text
items
do
not
have
to
be
in
quotes
unless
they
contain
commas
or
colons.
10
DATA
1,2,3,4
20
READA,B
30
PRLKTT
"A
=";A;"B
=";
READs
the
first
two
values
from
the
DATA
list.

Other manuals for Commodore Plus 4

Related product manuals