ClassesClassesClassesClasses | | | | Operators

tuple_insertT_tuple_insertTupleInserttuple_insertTupleInsertTupleInsert (Operator)

Name

tuple_insertT_tuple_insertTupleInserttuple_insertTupleInsertTupleInsert — Inserts one or more elements into a tuple at index.

Signature

tuple_insert( : : Tuple, Index, InsertTuple : Extended)

Herror T_tuple_insert(const Htuple Tuple, const Htuple Index, const Htuple InsertTuple, Htuple* Extended)

Herror tuple_insert(const HTuple& Tuple, const HTuple& Index, const HTuple& InsertTuple, HTuple* Extended)

void TupleInsert(const HTuple& Tuple, const HTuple& Index, const HTuple& InsertTuple, HTuple* Extended)

HTuple HTuple::TupleInsert(const HTuple& Index, const HTuple& InsertTuple) const

void HOperatorSetX.TupleInsert(
[in] VARIANT Tuple, [in] VARIANT Index, [in] VARIANT InsertTuple, [out] VARIANT* Extended)

VARIANT HTupleX.TupleInsert(
[in] VARIANT Tuple, [in] VARIANT Index, [in] VARIANT InsertTuple)

static void HOperatorSet.TupleInsert(HTuple tuple, HTuple index, HTuple insertTuple, out HTuple extended)

HTuple HTuple.TupleInsert(HTuple index, HTuple insertTuple)

Description

tuple_inserttuple_insertTupleInserttuple_insertTupleInsertTupleInsert inserts the elements of the tuple InsertTupleInsertTupleInsertTupleInsertTupleInsertTupleinsertTuple at index into the tuple TupleTupleTupleTupleTupletuple and returns them in the tuple ExtendedExtendedExtendedExtendedExtendedextended. In this context IndexIndexIndexIndexIndexindex determines the start index of the elements and InsertTupleInsertTupleInsertTupleInsertTupleInsertTupleinsertTuple the values to insert. Successive values of TupleTupleTupleTupleTupletuple will be positioned after the inserted values of InsertTupleInsertTupleInsertTupleInsertTupleInsertTupleinsertTuple. The parameter IndexIndexIndexIndexIndexindex must contain a single integer value (any floating point number must represent an integer value without fraction). Indices of tuple elements start at 0. Therefore, the first tuple element has got the index 0. If IndexIndexIndexIndexIndexindex contains the length of TupleTupleTupleTupleTupletuple as index, InsertTupleInsertTupleInsertTupleInsertTupleInsertTupleinsertTuple will be appended. The length of the result tuple ExtendedExtendedExtendedExtendedExtendedextended is always the sum of the two input tuples TupleTupleTupleTupleTupletuple and InsertTupleInsertTupleInsertTupleInsertTupleInsertTupleinsertTuple. For example, if TupleTupleTupleTupleTupletuple contains the values [0,1,0,1,0,1], the IndexIndexIndexIndexIndexindex contains the value [3] and the InsertTupleInsertTupleInsertTupleInsertTupleInsertTupleinsertTuple contains the values [2,2,2], then the output tuple ExtendedExtendedExtendedExtendedExtendedextended will contain the values [0,1,0,2,2,2,1,0,1]. It is allowed to mix strings and numbers in the input tuples TupleTupleTupleTupleTupletuple and InsertTupleInsertTupleInsertTupleInsertTupleInsertTupleinsertTuple.

Exception: Empty input tuples

If any of the input tuples is empty, an exception is raised.

Parallelization

Parameters

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.

IndexIndexIndexIndexIndexindex (input_control)  number HTupleHTupleHTupleVARIANTHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double) (Hlong / double) (Hlong / double)

Start index of elements to be inserted.

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

Element(s) to insert at index.

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

Tuple with inserted elements.

Alternatives

tuple_concattuple_concatTupleConcattuple_concatTupleConcatTupleConcat, tuple_replacetuple_replaceTupleReplacetuple_replaceTupleReplaceTupleReplace, tuple_gen_consttuple_gen_constTupleGenConsttuple_gen_constTupleGenConstTupleGenConst

See also

tuple_removetuple_removeTupleRemovetuple_removeTupleRemoveTupleRemove

Module

Foundation


ClassesClassesClassesClasses | | | | Operators