ASC() Convert a character to its ASCII value ------------------------------------------------------------------------------ Syntax ASC(<cExp>) --> nCode Arguments <cExp> is the character expression to be converted to a number. Returns ASC() returns an integer numeric value in the range of zero to 255, representing the ASCII value of <cExp>. Description ASC() is a character conversion function that returns the ASCII value of the leftmost character in a character string. ASC() is used primarily on expressions requiring numeric calculations on the ASCII value of a character. CHR() and ASC() are inverse functions. Examples . These examples illustrate various results of ASC(): ? ASC("A") // Result: 65 ? ASC("Apple") // Result: 65 ? ASC("a") // Result: 97 ? ASC("Z") - ASC("A") // Result: 25 ? ASC("") // Result: 0 Files Library is CLIPPER.LIB.
See Also: CHR() INKEY() STR() VAL()