Util.Ord

Top  Previous  Next

 

Syntax

function Util.Ord(AChar: char): integer

 

Alternative Names

ibec_Ord

 

Description

Converts a a character into its ordinal value. This is the opposite of the Util.Chr function.

 

The Return Value is the ordinal value of the character specified by AChar.

 

See Also

Util.Ord

 

Example

execute UDSBlock

as

begin

  /* Get ASCII value of 'A', which is 65 */

  IntValue = Util.Ord('A');

 

  /* Convert character ordinal value to character */

  StrValue = Util.Chr(IntValue);

  

  GUI.ShowMessage('Character "' || StrValue || '" has an ordinal value of ' || IntValue);

end