Download Print this page

Tandy color computer 8 basic Quick Reference Manual page 13

Advertisement

Functions
ABS
(n)
Returns
the absolute value
of
n.
A=ABS(B)
ASC
(string)
Returns
the
code
of
the
first
character
in
string.
A=ASC(B$)
ATN
(n)
Returns
the arctangent
of
n
in
radians.
A=ATN(B/3)
BUTTON
(n)
Returns
1
if
Joystick
Button
n
is
being pressed;
if
Joystick
Button
n
is
not
being
pressed,
n
can
be:
Right
joystick,
Button
1
(old joystick)
1
Right
joystick,
Button 2
2
Left joystick,
Button
1
(old joystick)
3
Left joystick,
Button 2
A=BUTTON(0)
CHR$
(n)
Returns
the character
corresponding
to
character
code
n.
A$=CHR$(65)
COS
[angle)
Returns
the
cosine
of
an angle
using
radians.
A=COS(B)
EOF(cf)
Returns
FALSE
(0)
if
there
is
more
data;
TRUE
(-1)
if
end
of
file
has
been
read.
d
Device
number:
-1
Cassette
IF
E0F(-1)=-1 THEN
220
ERLIN
Returns
the
BASIC
line
number
where an
error
has
occurred.
IF
ERLIN
=
110 THEN 200
ERNO
Returns
the
BASIC
error
number
for
the
error that
has
occurred.
IF
ERNO
=
20
THEN CLOSE
Functions
EXP
(n)
Returns a
natural
exponential
number
(e
A
/7).
A=EXP(B*1
.15)
FIX
(n)
Returns
the truncated
integer
of
n.
Unlike
INT,
FIX
does
not return the next
lower
number
for
a
negative
n.
A=FIX(B-.2)
HEX$
(n)
Returns a
string
with
the
hexadecimal
value
of
n.
PRINT HEX$CA)
;"
= ";
HPOINT
(x,y)
Returns
information
on
point
x,y
from
the high-
resolution
graphics
screen:
Point
is
reset
Code
Point
is
set
IF
HPOINT(22,33>=0
THEN 200
INKEYS
Checks
the
keyboard
and
returns
the key being
pressed
or,
if
no
key
is
being pressed,
returns
a
null
string
("
").
A$=INKEY$
INSTR
(p,s
t
t)
Searches a
string.
Returns
location
of
a
target
string
in
a search
string.
p
Start
position
of
search
s
String
being
searched
t
Target
string
A
=
INSTR
(1
,H5$,
"BEETS")
INT
(n)
Converts
n
to
the
largest integer that
is
less
than
or
equal
to
n.
A=INT(B+.5)
JOYSTK
(/)
Returns
the
horizontal or
vertical
coordinate
(j)
of
the
left
or
right joystick:
Horizontal,
right
joystick
1
Vertical, right
joystick
2
Horizontal,
left
joystick
3
Vertical,
left
joystick
A=JOYSTK(0)
18
19

Advertisement

loading
Need help?

Need help?

Do you have a question about the color computer 8 basic and is the answer not in the manual?