tuple_ords — Convert a tuple of strings into a tuple of integer numbers.
tuple_ords converts the input tuple T, which may only contain strings and integer numbers, into a tuple of integer numbers that represent the ASCII code of the characters of the strings (as long as the characters are part of the ASCII standard, for other characters please note the influence of the used character encoding table, as is touched in Tuple / String Operations). The characters of the individual strings are output according to their order within the string and within the tuple. Integer numbers are simply copied to an appropriate position in the output string. This operator can be used to prepare outputs with write_serial. In particular, a byte with value 0 can be written by inserting the integer number 0 into T.
If the input tuple is empty, the operator returns an empty tuple.
HDevelop provides an in-line operation for tuple_ords, which can be used in an expression in the following syntax:
Ords := ords(T)
Input tuple with strings.
Output tuple with integer numbers.
tuple_ords (['String 1', 0, 'String 2', 0], Data) write_serial (SerialHandle, Data)
tuple_chr, tuple_chrt, write_serial