tuple_sorttuple_sortTupleSortTupleSorttuple_sort (算子名称)

名称

tuple_sorttuple_sortTupleSortTupleSorttuple_sort — Sort the elements of a tuple in ascending order.

参数签名

tuple_sort( : : Tuple : Sorted)

Herror tuple_sort(const Hlong Tuple, Hlong* Sorted)

Herror T_tuple_sort(const Htuple Tuple, Htuple* Sorted)

void TupleSort(const HTuple& Tuple, HTuple* Sorted)

HTuple HTuple::TupleSort() const

static void HOperatorSet.TupleSort(HTuple tuple, out HTuple sorted)

HTuple HTuple.TupleSort()

def tuple_sort(tuple: MaybeSequence[Union[float, int, str]]) -> Sequence[Union[float, int, str]]

def tuple_sort_s(tuple: MaybeSequence[Union[float, int, str]]) -> Union[float, int, str]

描述

tuple_sorttuple_sortTupleSortTupleSortTupleSorttuple_sort sorts all elements of TupleTupleTupleTupletupletuple in ascending order and returns the result with SortedSortedSortedSortedsortedsorted. As a precondition the single elements of TupleTupleTupleTupletupletuple must be comparable. Thus, TupleTupleTupleTupletupletuple must either exclusively consist of strings or it must only contain (integer or floating point) numbers. In the latter case integers and floating point numbers may be mixed.

Exception: Empty input tuple

If the input tuple is empty, the operator returns an empty tuple.

HDevelop In-line Operation

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

Sorted := sort(Tuple)

运行信息

参数表

TupleTupleTupleTupletupletuple (input_control)  tuple(-array) HTupleMaybeSequence[Union[float, int, str]]HTupleHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)

Input tuple.

SortedSortedSortedSortedsortedsorted (output_control)  tuple(-array) HTupleSequence[Union[float, int, str]]HTupleHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)

Sorted tuple.

可替代算子

tuple_sort_indextuple_sort_indexTupleSortIndexTupleSortIndexTupleSortIndextuple_sort_index, tuple_inversetuple_inverseTupleInverseTupleInverseTupleInversetuple_inverse

模块

Foundation