ClassesClasses | | Operators

tuple_chrttuple_chrtTupleChrtTupleChrt (Operator)

Name

tuple_chrttuple_chrtTupleChrtTupleChrt — Convert a tuple of integer numbers into strings.

Signature

tuple_chrt( : : T : Chrt)

Herror tuple_chrt(const Hlong T, char* Chrt)

Herror T_tuple_chrt(const Htuple T, Htuple* Chrt)

void TupleChrt(const HTuple& T, HTuple* Chrt)

HTuple HTuple::TupleChrt() const

static void HOperatorSet.TupleChrt(HTuple t, out HTuple chrt)

HTuple HTuple.TupleChrt()

Description

tuple_chrttuple_chrtTupleChrtTupleChrtTupleChrt converts the input tuple TTTTt, 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 (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 operator tries to pack as many of the input numbers into one string as possible. Only if the value 0 occurs in TTTTt 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_serialread_serialReadSerialReadSerialReadSerial into strings. With this mechanism it is possible to read bytes with the value 0.

Exception: Empty input tuple

If the input tuple is empty, the operator returns an empty tuple.

HDevelop In-line Operation

HDevelop provides an in-line operation for tuple_chrttuple_chrtTupleChrtTupleChrtTupleChrt, which can be used in an expression in the following syntax:

Chrt := chrt(T)

Execution Information

Parameters

TTTTt (input_control)  integer(-array) HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Input tuple with integer numbers.

Restriction: 0 <= T <= 255

ChrtChrtChrtChrtchrt (output_control)  string(-array) HTupleHTupleHtuple (string / integer) (string / int / long) (HString / Hlong) (char* / Hlong)

Output tuple with strings that are separated by the integer number 0.

Example (HDevelop)

read_serial (SerialHandle, 100, Data)
tuple_chrt (Data, Strings)

Alternatives

tuple_chrtuple_chrTupleChrTupleChrTupleChr

See also

tuple_ordtuple_ordTupleOrdTupleOrdTupleOrd, tuple_ordstuple_ordsTupleOrdsTupleOrdsTupleOrds, read_serialread_serialReadSerialReadSerialReadSerial

Module

Foundation


ClassesClasses | | Operators