tuple_greatertuple_greaterTupleGreaterTupleGreatertuple_greater (算子)
名称
tuple_greatertuple_greaterTupleGreaterTupleGreatertuple_greater — 测试一个元组是否大于另一个元组。
签名
Herror tuple_greater(const Hlong T1, const Hlong T2, Hlong* Greater)
Herror T_tuple_greater(const Htuple T1, const Htuple T2, Htuple* Greater)
def tuple_greater(t1: MaybeSequence[Union[int, float, str]], t2: MaybeSequence[Union[int, float, str]]) -> int
描述
tuple_greatertuple_greaterTupleGreaterTupleGreaterTupleGreatertuple_greater tests whether the input tuple T1T1T1T1t1t1 is
greater than T2T2T2T2t2t2. A tuple T1T1T1T1t1t1 is said to be greater
than a tuple T2T2T2T2t2t2, if T1T1T1T1t1t1 has been found to be
greater when comparing it elementwise to T2T2T2T2t2t2 or if the first
min(|T1|,|T2|) elements are equal and T1T1T1T1t1t1 has got more
elements than T2T2T2T2t2t2。
With the elementwise comparison, the elements of T1T1T1T1t1t1 and
T2T2T2T2t2t2 are compared one by one. If the two elements are equal,
the next pair of elements will be examined. If the element of
T1T1T1T1t1t1 is greater than that from T2T2T2T2t2t2, the result is 1 and
the comparison will be aborted. If the element of T1T1T1T1t1t1 is less
than that from T2T2T2T2t2t2, 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_greatertuple_greaterTupleGreaterTupleGreaterTupleGreatertuple_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 内联操作
HDevelop provides an in-line operation for tuple_greatertuple_greaterTupleGreaterTupleGreaterTupleGreatertuple_greater,
which can be used in an expression in the following syntax:
Greater := T1 > T2
执行信息
- 多线程类型:独立(即使使用独占算子也能并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
T1T1T1T1t1t1 (输入控制) tuple(-array) → HTupleMaybeSequence[Union[int, float, str]]HTupleHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)
输入元组 1。
T2T2T2T2t2t2 (输入控制) tuple(-array) → HTupleMaybeSequence[Union[int, float, str]]HTupleHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)
输入元组 2。
GreaterGreaterGreaterGreatergreatergreater (输出控制) integer → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
输入元组的比较结果。
替代
tuple_greater_equaltuple_greater_equalTupleGreaterEqualTupleGreaterEqualTupleGreaterEqualtuple_greater_equal,
tuple_lesstuple_lessTupleLessTupleLessTupleLesstuple_less,
tuple_less_equaltuple_less_equalTupleLessEqualTupleLessEqualTupleLessEqualtuple_less_equal,
tuple_equaltuple_equalTupleEqualTupleEqualTupleEqualtuple_equal,
tuple_not_equaltuple_not_equalTupleNotEqualTupleNotEqualTupleNotEqualtuple_not_equal,
tuple_equal_elemtuple_equal_elemTupleEqualElemTupleEqualElemTupleEqualElemtuple_equal_elem,
tuple_not_equal_elemtuple_not_equal_elemTupleNotEqualElemTupleNotEqualElemTupleNotEqualElemtuple_not_equal_elem,
tuple_less_elemtuple_less_elemTupleLessElemTupleLessElemTupleLessElemtuple_less_elem,
tuple_greater_elemtuple_greater_elemTupleGreaterElemTupleGreaterElemTupleGreaterElemtuple_greater_elem,
tuple_less_equal_elemtuple_less_equal_elemTupleLessEqualElemTupleLessEqualElemTupleLessEqualElemtuple_less_equal_elem,
tuple_greater_equal_elemtuple_greater_equal_elemTupleGreaterEqualElemTupleGreaterEqualElemTupleGreaterEqualElemtuple_greater_equal_elem
模块
基础