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 Main;

Var

s: String;

i: Integer;

Begin

s := "Text example";

i := s.Chars(3).Asc;

End Sub Main;

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

See also:

Char