ClassesClassesClassesClasses | | | | Operators

tuple_sort_indextuple_sort_indexTupleSortIndextuple_sort_indexTupleSortIndexTupleSortIndex (Operator)


tuple_sort_indextuple_sort_indexTupleSortIndextuple_sort_indexTupleSortIndexTupleSortIndex — Sort the elements of a tuple and return the indices of the sorted tuple.


tuple_sort_index( : : Tuple : Indices)

Herror tuple_sort_index(const Hlong Tuple, Hlong* Indices)

Herror T_tuple_sort_index(const Htuple Tuple, Htuple* Indices)

Herror tuple_sort_index(const HTuple& Tuple, Hlong* Indices)

Herror tuple_sort_index(const HTuple& Tuple, HTuple* Indices)

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

HTuple HTuple::TupleSortIndex() const

void HOperatorSetX.TupleSortIndex(
[in] VARIANT Tuple, [out] VARIANT* Indices)

VARIANT HTupleX.TupleSortIndex([in] VARIANT Tuple)

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

HTuple HTuple.TupleSortIndex()


tuple_sort_indextuple_sort_indexTupleSortIndextuple_sort_indexTupleSortIndexTupleSortIndex sorts all elements of TupleTupleTupleTupleTupletuple in ascending order and returns the indices of the elements of the sorted tuple (in relation to the input tuple TupleTupleTupleTupleTupletuple) with IndicesIndicesIndicesIndicesIndicesindices. 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_sort_indextuple_sort_indexTupleSortIndextuple_sort_indexTupleSortIndexTupleSortIndex, which can be used in an expression in the following syntax:

Indices := sort_index(Tuple)



TupleTupleTupleTupleTupletuple (input_control)  number(-array) HTupleHTupleHTupleVARIANTHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*) (Hlong / double / BSTR) (Hlong / double / char*)

Input tuple.

IndicesIndicesIndicesIndicesIndicesindices (output_control)  number(-array) HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Sorted tuple.


tuple_sorttuple_sortTupleSorttuple_sortTupleSortTupleSort, tuple_inversetuple_inverseTupleInversetuple_inverseTupleInverseTupleInverse



ClassesClassesClassesClasses | | | | Operators