Function Ord returns the corresponding ASCII number of the specified character value. Parameter Ord specifies the character.
FUNCTION Ord(v : CHAR): INTEGER;def vs.Ord(v):
return INTEGER| Name | Type | Description |
|---|---|---|
| v | CHAR | ASCII character. |
The encoding used is Apple MacRoman. This leads to a number of troubles if you are on Windows and use characters above ASCII 128.
PROCEDURE Main;
VAR
str :STRING;
cnt :INTEGER;
BEGIN
str := GetText(FSActLayer);
FOR cnt := 1 TO Len(str) DO
AlrtDialog(Concat(Ord(Copy(str, cnt, 1))));
END;
RUN(Main);VS Functions: Chr
Availability: from All Versions