Developer Documentation Library > UNICOM Intelligence Function Library > Text functions > AscW
 
AscW
Returns an integer value representing the Unicode character code (sometimes called the code point) for a character.
Syntax
AscW(<value>)
Parameters
<value>
Type: Text
Text value. See also Specifying text strings as arguments.
(return)
Type: Long
Unicode character code for first character of <value>.
Notes
A Unicode character code is an integer from 0 to 65535.
This function returns 0 if <value> is empty. If the current data value is NULL, <value> is an empty string and 0 is returned.
Example
This mrScriptBasic example uses the AscW function to return the character code for a single character:
AscW("a")
The return value is 97.
The following example shows an SQL query that uses the AscW function to return the character code for the first character of the name variable (which stores the respondent's name).
SELECT AscW(name) FROM vdata
See also
ChrW
Text functions