tuple_sorttuple_sortTupleSortTupleSorttuple_sort (Operator)

Name

tuple_sorttuple_sortTupleSortTupleSorttuple_sort — Sortieren der Elemente eines Tupels in aufsteigender Reihenfolge.

Signatur

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]

Beschreibung

tuple_sorttuple_sortTupleSortTupleSortTupleSorttuple_sort sortiert die Elemente des Eingabetupels TupleTupleTupleTupletupletuple in aufsteigender Reihenfolge und liefert das Resultat in dem Ergebnistupel SortedSortedSortedSortedsortedsorted zurück. Als Voraussetzung hierfür müssen alle Elemente von TupleTupleTupleTupletupletuple vergleichbar sein, das heißt, entweder TupleTupleTupleTupletupletuple besteht gänzlich aus Strings oder es enthält ausschließlich Zahlen, wobei in letzterem Fall auch ganze Zahlen und Gleitkommazahlen vermischt auftreten dürfen.

Sonderfall: Leeres Eingabetupel

Falls das Eingabetupel leer ist, gibt der Operator ein leeres Tupel zurück.

HDevelop Inline-Operation

HDevelop unterstützt eine Inline-Operation für tuple_sorttuple_sortTupleSortTupleSortTupleSorttuple_sort, die innerhalb eines Ausdrucks in der folgenden Syntax verwendet werden kann:

Sorted := sort(Tuple)

Ausführungsinformationen

Parameter

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

Eingabetupel.

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

Sortiertes Tupel.

Alternativen

tuple_sort_indextuple_sort_indexTupleSortIndexTupleSortIndexTupleSortIndextuple_sort_index, tuple_inversetuple_inverseTupleInverseTupleInverseTupleInversetuple_inverse

Modul

Foundation