The $ASCII function returns the integer ASCII code for a character in a string.
The format for the $ASCII function is:
$A[SCII](expr[,intexpr])
The expression acts as the source string from which $ASCII() extracts the character it decodes.
The optional integer expression contains the position within the expression of the character that $ASCII() decodes. If this argument is missing, $ASCII() returns a result based on the first character position. $ASCII() starts numbering character positions at one (1), (i.e., the first character of a string is at position one (1)).
If the explicit or implicit position is before the beginning or after the end of the expression, $ASCII() returns a value of negative one (-1).
$ASCII() provides a means of examining non-graphic characters in a string. Used with $CHAR(), $ASCII() also provides a means to perform arithmetic operations on the codes associated with characters.