tuple_sort_indextuple_sort_indexTupleSortIndexTupleSortIndex (Operator)

Name

tuple_sort_indextuple_sort_indexTupleSortIndexTupleSortIndex — Sortieren eines Tupels und Rückgabe der Indizes des sortierten Tupels.

Signatur

tuple_sort_index( : : Tuple : Indices)

Herror tuple_sort_index(const Hlong Tuple, Hlong* Indices)

Herror T_tuple_sort_index(const Htuple Tuple, Htuple* Indices)

void TupleSortIndex(const HTuple& Tuple, HTuple* Indices)

HTuple HTuple::TupleSortIndex() const

static void HOperatorSet.TupleSortIndex(HTuple tuple, out HTuple indices)

HTuple HTuple.TupleSortIndex()

Beschreibung

tuple_sort_indextuple_sort_indexTupleSortIndexTupleSortIndexTupleSortIndex sortiert die Elemente des Eingabetupels TupleTupleTupleTupletuple in aufsteigender Reihenfolge und liefert als Resultat die Indizes der Elemente des sortierten Tupels (bezogen auf das Eingabetupel) in dem Ergebnistupel IndicesIndicesIndicesIndicesindices zurück. Als Voraussetzung hierfür müssen alle Elemente von TupleTupleTupleTupletuple vergleichbar sein, das heißt, entweder TupleTupleTupleTupletuple besteht gänzlich aus Strings oder es enthält ausschließlich Zahlen, wobei in letzterem Fall auch ganze Zahlen und Gleitkommazahlen auch 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_sort_indextuple_sort_indexTupleSortIndexTupleSortIndexTupleSortIndex, die innerhalb eines Ausdrucks in der folgenden Syntax verwendet werden kann:

Indices := sort_index(Tuple)

Ausführungsinformationen

Parameter

TupleTupleTupleTupletuple (input_control)  tuple(-array) HTupleHTupleHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)

Eingabetupel.

IndicesIndicesIndicesIndicesindices (output_control)  integer(-array) HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Sortiertes Tupel.

Alternativen

tuple_sorttuple_sortTupleSortTupleSortTupleSort, tuple_inversetuple_inverseTupleInverseTupleInverseTupleInverse

Modul

Foundation