tuple_chrt — Convert a tuple of integers into strings with the corresponding ASCII codes.
tuple_chrt converts the input tuple T, consisting of integer numbers, into a tuple of strings and integer numbers (where only the number 0 can occur in the output), the characters of which have the ASCII code of the corresponding input number. The operator tries to pack as many of the input numbers into one string as possible. Only if the value 0 occurs in T the current string is terminated at this point, the integer number 0 is inserted into the output, and a new string with the remaining input values is started. This operator can be used to convert data read with read_serial into strings. With this mechanism it is possible to read bytes with the value 0.
If the input tuple is empty, the operator returns an empty tuple.
HDevelop provides an in-line operation for tuple_chrt, which can be used in an expression in the following syntax:
Chrt := chrt(T)
Restriction: 0 <= T <= 255
Strings corresponding to the ASCII code of the input tuple.
read_serial (SerialHandle, 100, Data) tuple_chrt (Data, Strings)
tuple_ord, tuple_ords, read_serial