Commodore 16 User Manual page 74

Hide thumbs Also See for Commodore 16:
Table of Contents

Advertisement

ATN(X) (arctangent)
INSTR (string 1, string 2 (,starting-position))
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")
Returns position of string 2 in string 1 at or after the (starting-position)
.
The starting-position defaults to the beginning of string 2. It no match is
found. a value of 0 is returned.
EXAMPLE
PRINT INSTR("THE CAT IN THE HAT", "CAT")
the result is 5, because CAT starts at the fifth cnaracter in string I
INT(%)
(integer)
Returns the integer portion of X. with all decimal places to the right of
the decimal point removed. The result is always less-than or equal to
X. Thus, any negative numbers with decimal places become the
integer less-than their current value (e.g. INT(-4.5)c-5).
If the INT function is to be used for rounding off, the form is INT(X + 5)
or INT(X - .5).
EXAMPLE:
EXP(X)
Returns the value of the mathematical constant e (2.71828183) raised
XaINT(X•100 + .5)/100
Rounds to the next highest penny
to the power Of X.
FNxx(x)
Returns the value of the user-defined function xx created in a DEF FNxx
statement
JOY (n)
When n 1
Position of joystick #1
n = 2
Position of joystick #2
Any value of 128 or more means the fire button is also depressed. The
direction is indicated as lolows.
144
145

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Commodore 16 and is the answer not in the manual?

Questions and answers

Table of Contents