Converts the first character of a string to its Unicode code point. A Unicode code point is the numerical integer value given to a Unicode character.
Asc ( string )
Argument |
Description |
---|---|
string |
The string for which you want the code point value of the first character |
Unsigned integer. Returns the code point value of the first character in string.
Use Asc to test the case of a character or manipulate text and letters.
To find out the case of a character, you can check whether its code point value is within the appropriate range.
This expression for a computed field returns the string in code_id if the code point value of the first character in code_id is A (65):
If (Asc(code_id) = 65, code_id, "Not a valid code")
This expression for a computed field checks the case of the first character of lname and if it is lowercase, makes it uppercase:
IF (Asc(lname) > 64 AND Asc(lname) < 91, lname, WordCap(lname))