Skip to content

tuple_greaterTupleGreaterTupleGreatertuple_greatertuple_greater🔗

Short description🔗

tuple_greaterTupleGreaterTupleGreatertuple_greatertuple_greater — Test whether a tuple is greater than another tuple.

Signature🔗

tuple_greater( tuple T1, tuple T2, out integer Greater )void TupleGreater( const HTuple& T1, const HTuple& T2, HTuple* Greater )static void HOperatorSet.TupleGreater( HTuple t1, HTuple t2, out HTuple greater )def tuple_greater( t1: MaybeSequence[Union[int, float, str]], t2: MaybeSequence[Union[int, float, str]] ) -> int

Herror tuple_greater( const Hlong T1, const Hlong T2, Hlong* Greater )

Herror T_tuple_greater( const Htuple T1, const Htuple T2, Htuple* Greater )

HTuple HTuple::TupleGreater( const HTuple& T2 ) const

HTuple HTuple.TupleGreater( HTuple t2 )

Description🔗

tuple_greaterTupleGreater tests whether the input tuple T1t1t1 is greater than T2t2t2. A tuple T1t1t1 is said to be greater than a tuple T2t2t2, if T1t1t1 has been found to be greater when comparing it elementwise to T2t2t2 or if the first \(min(|T1|,|T2|)\) elements are equal and T1t1t1 has got more elements than T2t2t2.

With the elementwise comparison, the elements of T1t1t1 and T2t2t2 are compared one by one. If the two elements are equal, the next pair of elements will be examined. If the element of T1t1t1 is greater than that from T2t2t2, the result is 1 and the comparison will be aborted. If the element of T1t1t1 is less than that from T2t2t2, the result is 0 and the comparison will be aborted. If all elements have been tested and if all were equal, the result is 0.

As a precondition for comparing the tuples elementwise two corresponding elements must either both be (integer or floating point) numbers or both be strings. Otherwise tuple_greaterTupleGreater returns an error.

Exception: Empty input tuples🔗

If one input tuple is empty and the other is not, the tuple that is not empty is considered greater than the empty one.

HDevelop In-line Operation🔗

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

Greater := T1 > T2

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🔗

T1t1t1 (input_control) tuple(-array) → (integer / real / string)HTuple (Hlong / double / HString)HTuple (int / long / double / string)MaybeSequence[Union[int, float, str]]Htuple (Hlong / double / char*)

Input tuple 1.

T2t2t2 (input_control) tuple(-array) → (integer / real / string)HTuple (Hlong / double / HString)HTuple (int / long / double / string)MaybeSequence[Union[int, float, str]]Htuple (Hlong / double / char*)

Input tuple 2.

Greatergreatergreater (output_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Result of the comparison of the input tuples.

Combinations with other operators🔗

Combinations

Alternatives

tuple_greater_equalTupleGreaterEqual, tuple_lessTupleLess, tuple_less_equalTupleLessEqual, tuple_equalTupleEqual, tuple_not_equalTupleNotEqual, tuple_equal_elemTupleEqualElem, tuple_not_equal_elemTupleNotEqualElem, tuple_less_elemTupleLessElem, tuple_greater_elemTupleGreaterElem, tuple_less_equal_elemTupleLessEqualElem, tuple_greater_equal_elemTupleGreaterEqualElem

Module🔗

Foundation