Char.Asc

Syntax

Asc: Integer;

Description

The Asc property returns the character code.

Comments

The property returns code from the ASCII code table for the characters, which ASCII code is less than 127. The property returns code in Unicode encoding for the characters, which ASCII code is greater than 127.

Example

Sub UserProc;
Var
    s: String;
    i: Integer;
Begin
    s := "Text example";
    i := s.Chars(3).Asc;
End Sub UserProc;

After executing the example the "i" variable contains the ASCII code of the character "t", that is, 84.

See also:

Char