TRS-SO MODEL III
ASC (string)
Returns the ASCII code for the first character
of
the specified string. The
string-argument must be enclosed in parentheses. A null-string argument will cause
an errorto occur.
100 PRINT ASC("A")
110T$
=
"AS":
PRINTASC (T$)
Lines 100 and 110 will print the same number.
The argument may be an expression involving string operators and functions:
200 PRINTASC(RIGHT$(T$, 1))
Referto the ASCII CodeTable, Appendix C.
CHR$(expression)
Performs the inverse
of
the ASC function: returns aone-characterstring whose
characterhas the specified
ASCII, control
or
graphics code. The argument may be
any numberfrom 0 to 255, orany variable expression with a value in that range.
Argument must be enclosed in parentheses.
100 PRINTCHR$(35)
Prints a number-sign #
Using CHR$, you can even assign quote-marks (normally used as string-delimiters)
to strings. The
ASCII code for quotes" is 34.
SO
A$ = CHR$(34) assigns the value" to
A$.
410
A$
=
CHR$(34)
420
PRINT
"HE
SAID,
";
AS;
"HELLO.";
AS
5/2