Description
Converts the first character of a string to its Unicode code point. A code point is the numerical integer value given to a Unicode character. .
Syntax
Asc ( string )
Argument |
Description |
---|---|
string |
The string for which you want the code point value of the first character |
Return value
Unsigned Integer. Returns the code point value of the first character in string. If string is null, Asc returns null.
Usage
You can use Asc to find out the case of a character by testing whether its code point value is within the appropriate range.
Examples
This statement returns 65, the code point value for uppercase A:
Asc("A")
This example checks if the first character of string ls_name is uppercase:
String ls_name IF Asc(ls_name) > 64 and Asc(ls_name) < 91 THEN ...
See also
Asc method for DataWindows in the section called “Asc” in DataWindow Reference.