Name
tuple_is_mixedtuple_is_mixedTupleIsMixedtuple_is_mixedTupleIsMixedTupleIsMixed — Test whether a tuple is of type mixed.
Herror tuple_is_mixed(const char* T, Hlong* IsMixed)
Herror T_tuple_is_mixed(const Htuple T, Htuple* IsMixed)
Herror tuple_is_mixed(const HTuple& T, Hlong* IsMixed)
tuple_is_mixedtuple_is_mixedTupleIsMixedtuple_is_mixedTupleIsMixedTupleIsMixed tests the input tuple TTTTTt.
If the type is mixed, the value 1 (true) is returned in
IsMixedIsMixedIsMixedIsMixedIsMixedisMixed, else 0 (false) is returned. If a tuple consists of
elements with equal data types only, IsMixedIsMixedIsMixedIsMixedIsMixedisMixed can nevertheless be 1
in case the internal representation is H_TYPE_MIXED; see
tuple_typetuple_typeTupleTypetuple_typeTupleTypeTupleType for details.
If the type of the tuple is mixed and you need all elements of
the tuple TTTTTt to be of one data type only, you can
explicitly convert the tuple to a better fitting
representation by using tuple_inttuple_intTupleInttuple_intTupleIntTupleInt, tuple_realtuple_realTupleRealtuple_realTupleRealTupleReal or
tuple_stringtuple_stringTupleStringtuple_stringTupleStringTupleString with Format='s'. This improves processing speed for the
converted tuple which is especially useful if the tuple is used many times
afterwards.
Exception: Empty input tuple
If the input tuple is empty, the operator returns 1.
HDevelop In-line Operation
HDevelop provides an in-line operation for tuple_is_mixedtuple_is_mixedTupleIsMixedtuple_is_mixedTupleIsMixedTupleIsMixed,
which can be used in an expression in the following syntax:
IsMixed := is_mixed(T)
- Multithreading type: independent (runs in parallel even with exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
TTTTTt (input_control) number(-array) → HTupleHTupleHTupleVARIANTHtuple (string / real / integer) (string / double / int / long) (HString / double / Hlong) (char* / double / Hlong) (BSTR / double / Hlong) (char* / double / Hlong)
Input tuple.
Is the input tuple of type mixed?
tuple_is_mixed ([3.1416,'pi',3], IsMixedA)
* IsMixedA = true
tuple_is_mixed (['a','b','111'], IsMixedB)
* IsMixedB = false
tuple_is_mixed ([], IsMixedC)
* IsMixedC = true
If the parameters are valid, the operator
tuple_is_mixedtuple_is_mixedTupleIsMixedtuple_is_mixedTupleIsMixedTupleIsMixed returns the value 2 (H_MSG_TRUE).
tuple_typetuple_typeTupleTypetuple_typeTupleTypeTupleType,
tuple_is_numbertuple_is_numberTupleIsNumbertuple_is_numberTupleIsNumberTupleIsNumber
tuple_is_inttuple_is_intTupleIsInttuple_is_intTupleIsIntTupleIsInt,
tuple_is_realtuple_is_realTupleIsRealtuple_is_realTupleIsRealTupleIsReal
Foundation