User`s manual

A-14
Function Operation Examples Page
SGN
(exp)
Returns -1 for negative
exp
; 0 for zero
exp
; +1 for positive
exp.
SGN(A*B+3)
SGN(COS(X))
7/4
SIN
(exp)
Returns the sine of
exp
; assumes
exp
is
in radians.
SIN(A/B)
SIN(90/57.29578)
7/4
SQR
(exp)
Returns square root of exp. Limits:
exp
must be non-negative.
SQR(A*A-B*B)
7/5
TAN
(exp)
Returns the tangent of
exp
; assumes
exp
is in radians.
TAN(X)
TAN(X*.01745329)
7/5
Special Functions
Function Operation and Limits Examples Page
ERL Returns line number of current error.
ERL
8/3
ERR Returns a value related to current
error code (if error has occurred).
ERR=(error code-1)*2. Also:
(ERR/2)+1=error code.
ERR/2+1
8/4
INP
(port)
Inputs and returns the current value
from the specified
port
. Both argument
and result are in the range 0 to 255
inclusive.
INP(55)
8/4
MEM Returns total unused and unprotected
bytes in memory. Does not include
unused string storage space.
MEM
8/5
PEEK
(location)
Returns value stored in the specified
memory byte.
location
must be a valid
memory address in decimal form (see
Memory Map in Appendix D).
PEEK(15370)
8/6
POINT
(x,y)
Checks the graphics block specified by
horizontal coordinate
x
and vertical
coordinate
y
. If block is "on", returns a
True (-1); if block is "off", returns a
False (0).
Limits: 0 <=
x
< 128; 0 <=
y
< 48.
POINT(A*2,B+C)
8/2
POS(0) Returns a number indicating the cur-
rent cursor position. The argument "0"
is a dummy variable.
POS(0)
8/7