Function Block ORD

The Function Block ORD converts the first byte of a string to a value between 0 and 255.

Input

The input expects a string. The first character is used for the calculation, and the rest is ignored.

Output

The output returns the position of the character as an integer. If the input is in a single-byte encoding such as ASCII, ISO-8859, or Windows 1252, this is equivalent to returning the position of the character in the character set's mapping table. However, note that this function ignores the string encoding and will never recognize a Unicode code point in a multi-byte encoding like UTF-8 or UTF-16.

See Also