394
ASC( ) Function
Get Internal Character Value
Format
ASC(char$[,ERR=stmtref])
Where:
char$
Single-character whose ASCII value is to be returned. String expression.
stmtref
Program line number or label to transfer control to.
Returns
Integer, ASCII character set number, range 0 to 255.
Description
The ASC( ) function returns the internal numeric value of a given character char$,
based on its position in the ASCII character set/table. The value returned is an
integer, range 0 to 255 (ASCII character set number). Only the first character in the
string is converted to its internal value.
Examples
?ASC("A")! yields 65
string$="a";?ASC(string$) ! yields 97
?ASC("abc") ! also yields 97 (the ASCII value for "a")