372
The
VIC
20
User
Guide
If
the string
is
longer
than
one character, ASC returns the ASCII code
for the first character in the string. The returned argument
is
a number and
may be used in arithmetic operations. ASCII codes are listed in Appendix
A.
Example:
ATN
?ASC(IIA")
X-FlSCCHS")
?X
Prints
65
Prints the ASCII value of "S," which
is
83
A TN returns the arctangent of the argument.
Format:
ATN(data n)
A TN returns the value in radians in the range ±
17.
Example:
CHR$
AIIATNCAO)
?1801f*ATN(A)
CHR$ returns the string representation of the specified ASCII code.
Format:
CHR$(byte)
CHR$
can be used to specify characters
that
cannot be represented in
strings. These include a carriage return and the double quotation mark.
Example:
IF
C.=CHR'(13)
GOTO
10
Branch if C$
is
a carriage return (CHR$(13»
?CHR'(34) :
"HOHOHO"
:
CHR$(34)
Print the eight characters
"HOHOHO"
(where
CHR$(34) represents a double quotation mark)