EasyManua.ls Logo

Commodore VIC-20 - Page 393

Commodore VIC-20
404 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...
Appendix
H
BASIC
Functions 379
IF
A)C
THEN
SAaSGN(X)
IF
SGN(M»=e
THEN
P~INT
"POSITIVE
NUMBER"
SIN
SIN returns the sine of the argument.
Format:
SIN(arg n)
Example:
SPC
A=SIN(AG)
19IN(45*ft'/180)
Displays the sine
of
45
degrees
SPC moves the cursor right a specified number of positions.
Format:
SPC(byte)
The
SPC
function
is
used in
PRINT
statements to move the cursor
some number of character positions to the right. Text which the cursor
passes over
is
not modified.
The
SPC
function moves the cursor right from whatever column the
cursor happens to be in when the
SPC
function
is
encountered. This
is
in
contrast to a TAB function, which moves the cursor to some fixed column
measured from the leftmost column
ofthe
display. (See TAB for examples.)
SQR
SQR
returns the square root
of
a positive number. A negative number
returns
an
error message.
Format:
SQR(arg n)
Example:
A-SQR(4)
fI-SQR(4.84)
?SQR(144E30)
Results in
A=2
Results in A=2.2
Displays 1.2E+
16.

Other manuals for Commodore VIC-20

Related product manuals