Commodore VIC-20 Programmer's Reference Manual page 58

Hide thumbs Also See for VIC-20:
Table of Contents

Advertisement

EXAMPLE:
I
10 XS = "TEST"
20 PRINT ASC(XS)
RUN
84
READY.
I
See the CHRS function for ASCII-to-string conversion.
ATN
Format:
Abbreviation:
Screen Display:
ATN(X)
A JP|Jt
a \D
Action:
Returns the arctangent of X in radians. Result \s in the
range — pi/2 to pi/2. The expression X may be any numeric type, but
the evaluation of ATN is always performed \n floating point binary.
EXAMPLE:
10 INPUT X
20 PRfNT ATN(X)
RUN
?3
1.24904577
READY.
CHR$
Format:
Abbreviation:
Screen Display:
CHR$(I)
cBBBIh
C
( I
Action: Returns a string whose one element has ASCII code L
(ASCH codes are listed in Appendix F.) CHR$ is commonly used to
send a special character to the terminal. For instance, a screen
clear could be sent (CHR$(147)} to clear the CRT screen and return
the cursor to the home position, as a preface 1o an error message.
EXAMPLE:
PRINT CHRS(66)
B
READY.
42
I
I

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents