EasyManua.ls Logo

Commodore Plus 4 - Page 167

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...
FUNCTIONS
Numeric
functions
are
classified
as
such
because
they
return
num
bers.
The
functions
they
perform
range
from
calculating
mathematical
functions
to
specifying
a
screen
location.
Numeric
functions
follow
the
form:
Numeric
Functions
FUNCTION
(argument)
where
the
argument
can be
a numerical
value,
variable,
or
string.
ABS(X)
(absolute
value)
The
absolute value
function
returns
the
positive
value
of
the
argument
X.
ASC(X$)
This
function
returns
the
ASCII
code
(number)
of
the
first
character
ofX$.
ATN(X)
(arctangent)
Returns
the
angle
whose
tangent
is
X,
measured
in
radians.
COS{X)
(cosine)
Returns
the
value
of
the
cosine
of
X,
where
X
is
an
angle
measured
in
radians.
DEC
(hexadecimal-string)
Returns
decimal
value
of
hexadecimal-string
(0<
hexadecimal
-
string<FFFF)
EXAMPLE:
N=DEC("F4")
EXP(X)
Returns
the
value
of
the
mathematical
constant
e
(2.71828183)
raised
to
the
power
of X.
FNxx(x)
Returns
the
value
of
the
user-defined
function
xx
created
in
a
DEF
FNxx
statement.
INSTR
(string
1,
string
2
\
starting-position
\)
Returns
position
of
string
2
in
string
1
at
or
afterthe
(starting-position].
The
starting-position
defaults
to
the
beginning
of
string
2.
If
no
match
is
found,
a
value
of
0
is
returned.
158

Other manuals for Commodore Plus 4

Related product manuals