Asc

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

Returns

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

Example 1

This statement returns 65, the code point value for uppercase A:

Asc("A")

Example 2

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