EasyManua.ls Logo

Radio Shack TRS-80 Model III - Page 174

Radio Shack TRS-80 Model III
274 pages
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...
as
TRS-80 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
error to occur.
100
PRINT
ASC("A")
1
1
T$
=
"AB": PRINT
ASC (T$)
Lines
100 and 1 10 will
print the
same number.
The
argument may
be an
expression involving
string
operators
and functions:
200 Print
asc(right$(t$,
1))
Refer to the ASCII
Code
Table,
Appendix
C.
CHR$
(expression)
Performs
the inverse
of the
ASC function:
returns a one-character
string
whose
character
has the
specified ASCII,
control
or graphics
code. The
argument may
be
any
number from
to
255 ,
or any
variable expression
with
a
value
in that
range.
Argument must
be enclosed
in
parentheses.
1
00
PRINT
CHR$(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*
"?
A*;
"HELLO."?
A*
164

Other manuals for Radio Shack TRS-80 Model III

Related product manuals