Skip to content

tuple_is_mixedTupleIsMixedTupleIsMixedtuple_is_mixedtuple_is_mixedšŸ”—

Short descriptionšŸ”—

tuple_is_mixedTupleIsMixedTupleIsMixedtuple_is_mixedtuple_is_mixed — Test whether a tuple is of type mixed.

SignaturešŸ”—

tuple_is_mixed( tuple T, out number IsMixed )void TupleIsMixed( const HTuple& T, HTuple* IsMixed )static void HOperatorSet.TupleIsMixed( HTuple t, out HTuple isMixed )def tuple_is_mixed( t: HTupleType ) -> int

Herror tuple_is_mixed( const char* T, Hlong* IsMixed )

Herror T_tuple_is_mixed( const Htuple T, Htuple* IsMixed )

HTuple HTuple::TupleIsMixed( ) const

HTuple HTuple.TupleIsMixed( )

DescriptionšŸ”—

tuple_is_mixedTupleIsMixed tests the input tuple Ttt. If the type is mixed, the value 11 (true) is returned in IsMixedisMixedis_mixed, else 00 (false) is returned. If a tuple consists of elements with equal data types only, IsMixedisMixedis_mixed can nevertheless be 1 in case the internal representation is H_TYPE_MIXED; see tuple_typeTupleType for details.

If the type of the tuple is mixed and you need all elements of the tuple Ttt to be of one data type only, you can explicitly convert the tuple to a better fitting representation by using tuple_intTupleInt, tuple_realTupleReal or tuple_stringTupleString 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_mixedTupleIsMixed, which can be used in an expression in the following syntax:

IsMixed := is_mixed(T)

Execution informationšŸ”—

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

ParametersšŸ”—

Ttt (input_control) tuple(-array) → (string / real / integer / handle)HTuple (HString / double / Hlong / HHandle)HTuple (string / double / int / long / HHandle)HTupleTypeHtuple (char* / double / Hlong / handle)

Input tuple.

IsMixedisMixedis_mixed (output_control) number → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Is the input tuple of type mixed?

ExamplešŸ”—

(HDevelop)

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

ResultšŸ”—

If the parameters are valid, the operator tuple_is_mixedTupleIsMixed returns the value 2 (H_MSG_TRUE).

Combinations with other operatorsšŸ”—

Combinations

Alternatives

tuple_typeTupleType, tuple_is_numberTupleIsNumber

See also

tuple_is_intTupleIsInt, tuple_is_realTupleIsReal

ModulešŸ”—

Foundation