Download Print this page

Tandy color computer 8 basic Quick Reference Manual page 14

Advertisement

Functions
Functions
LEFTS
(stringjength)
Returns
the
left
portion
of
a
string.
length
Specifies
number
of
characters
returned.
A$=LEFT$(B$,3)
LEN
(string)
Returns
the length
of string.
A=LEN(B$)
LOG
(n)
Returns
the
natural
logarithm
of
n.
A=L0G(B/2)
LPEEK (memory
location)
Returns
the contents
of
a
virtual
memory
location
(0-524287 decimal
or
0-$7FFFF
hexadecimal).
A^LPEEK(&H7FFF0)
MEM
Returns
the
amount
of
free
memory.
A =
MEM
MID$
(s,p,l)
Returns a
substring
of string
s.
s
Source
string
p
Starting position
of
substring
/
Length
of
substring
A$=MID$
(B$,Z,2)
PEEK
(memory
iocation)
Returns
the contents
of
a
memory
location
(0-65535 decimal
or
0-&HFFFF
hexadecimal).
A=PEEK
(30020)
POINT
(x,y)
Returns
information
on
point
x,y
from
the
low-
resolution
text
screen:
-1
Point
is
part
of
an alphanumeric
character
Point
is
reset
Code
Point
is
set
A=P0INT
(22
f
33)
POS
(dev)
Returns
the current
print
position.
dev
Print
device
number:
Screen
-2
Printer
a=pos
(0)
PPOINT
(x,y)
Returns
information
on
point x.y
from
the
low-
resolution
graphics
screen:
Point
is
reset
Code
Point
is
set
A=PP0INT
(22,33)
RIGHTS
(stringjength)
Returns
the
right
portion
of
a
string.
length
Specifies
number
of
characters
returned.
A$=RI6HT$
<B$,4)
RND
(n)
Generates a "random"
number
between
1
and
n
if
n>1,
or
between
and
1
if
n=Q.
A=RND
(0)
SGN
(n)
Returns
the sign
of
n:
-1
Negative
0-0
1
positive
A=SGN(A+.1)
SIN
(angie)
Returns
the sine
of
angle
using
radians.
A=SIN(B/3.141
59)
STRINGS
(i,c)
Returns a
string of
a repeated
character.
/
Length
of string
c
Character used.
Can
be
a code,
or
a
string.
A$
=
STRING$(22,'*A")
STR$
(n)
Converts n
to
a
string.
A$=STR$(1
.234)
SQR
(n)
Returns
the
square
root
of
n.
A=SQR(B/2)
TAN
(angie)
Returns
the
tangent
of
angle
using
radians.
A=TAN(B)
21
20

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?