tuple_greater
— Test whether a tuple is greater than another tuple.
tuple_greater
tests whether the input tuple T1
is
greater than T2
. A tuple T1
is said to be greater
than a tuple T2
, if T1
has been found to be
greater when comparing it elementwise to T2
or if the first
min(|T1|,|T2|) elements are equal and T1
has got more
elements than T2
.
With the elementwise comparison, the elements of T1
and
T2
are compared one by one. If the two elements are equal,
the next pair of elements will be examined. If the element of
T1
is greater than that from T2
, the result is 1 and
the comparison will be aborted. If the element of T1
is less
than that from T2
, 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_greater
returns an error.
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 provides an in-line operation for tuple_greater
,
which can be used in an expression in the following syntax:
T1
(input_control) tuple(-array) →
(integer / real / string)
Input tuple 1.
T2
(input_control) tuple(-array) →
(integer / real / string)
Input tuple 2.
Greater
(output_control) integer →
(integer)
Result of the comparison of the input tuples.
tuple_greater_equal
,
tuple_less
,
tuple_less_equal
,
tuple_equal
,
tuple_not_equal
,
tuple_equal_elem
,
tuple_not_equal_elem
,
tuple_less_elem
,
tuple_greater_elem
,
tuple_less_equal_elem
,
tuple_greater_equal_elem
Foundation