ClassesClassesClassesClasses | | | | Operators

tuple_find_firsttuple_find_firstTupleFindFirsttuple_find_firstTupleFindFirstTupleFindFirst (Operator)


tuple_find_firsttuple_find_firstTupleFindFirsttuple_find_firstTupleFindFirstTupleFindFirst — Return the index of the first occurrence of a tuple within another tuple.


tuple_find_first( : : Tuple, ToFind : Index)

Herror tuple_find_first(const Hlong Tuple, const Hlong ToFind, Hlong* Index)

Herror T_tuple_find_first(const Htuple Tuple, const Htuple ToFind, Htuple* Index)

Herror tuple_find_first(const HTuple& Tuple, const HTuple& ToFind, Hlong* Index)

void TupleFindFirst(const HTuple& Tuple, const HTuple& ToFind, HTuple* Index)

HTuple HTuple::TupleFindFirst(const HTuple& ToFind) const

void HOperatorSetX.TupleFindFirst(
[in] VARIANT Tuple, [in] VARIANT ToFind, [out] VARIANT* Index)

VARIANT HTupleX.TupleFindFirst(
[in] VARIANT Tuple, [in] VARIANT ToFind)

static void HOperatorSet.TupleFindFirst(HTuple tuple, HTuple toFind, out HTuple index)

HTuple HTuple.TupleFindFirst(HTuple toFind)


tuple_find_firsttuple_find_firstTupleFindFirsttuple_find_firstTupleFindFirstTupleFindFirst searches forward through TupleTupleTupleTupleTupletuple for the first occurrence of the values of the second tuple ToFindToFindToFindToFindToFindtoFind and returns the IndexIndexIndexIndexIndexindex (in relation to the first input tuple TupleTupleTupleTupleTupletuple). For example, if TupleTupleTupleTupleTupletuple contains the values [3,4,5,6,1,2,3,4,0] and ToFindToFindToFindToFindToFindtoFind contains the values [3,4], the output IndexIndexIndexIndexIndexindex is 0. If the first tuple does not contain the second tuple as a subtuple, tuple_find_firsttuple_find_firstTupleFindFirsttuple_find_firstTupleFindFirstTupleFindFirst returns -1 in IndexIndexIndexIndexIndexindex. It is allowed to mix strings and numbers in the input tuples.

Exception: Empty input tuples

If either or both of the input tuples are empty, the operator returns an empty tuple.

HDevelop In-line Operation

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

Index := find_first(Tuple, ToFind)



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 to examine.

ToFindToFindToFindToFindToFindtoFind (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 with values to find.

IndexIndexIndexIndexIndexindex (output_control)  number HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Index of the first occurrence of the values to find.


tuple_findtuple_findTupleFindtuple_findTupleFindTupleFind, tuple_find_lasttuple_find_lastTupleFindLasttuple_find_lastTupleFindLastTupleFindLast, tuple_sorttuple_sortTupleSorttuple_sortTupleSortTupleSort, tuple_equal_elemtuple_equal_elemTupleEqualElemtuple_equal_elemTupleEqualElemTupleEqualElem



ClassesClassesClassesClasses | | | | Operators