ClassesClassesClassesClasses | | | | Operators

tuple_replaceT_tuple_replaceTupleReplacetuple_replaceTupleReplaceTupleReplace (Operator)


tuple_replaceT_tuple_replaceTupleReplacetuple_replaceTupleReplaceTupleReplace — Replaces one or more elements of a tuple.


tuple_replace( : : Tuple, Index, ReplaceTuple : Replaced)

Herror T_tuple_replace(const Htuple Tuple, const Htuple Index, const Htuple ReplaceTuple, Htuple* Replaced)

Herror tuple_replace(const HTuple& Tuple, const HTuple& Index, const HTuple& ReplaceTuple, HTuple* Replaced)

void TupleReplace(const HTuple& Tuple, const HTuple& Index, const HTuple& ReplaceTuple, HTuple* Replaced)

HTuple HTuple::TupleReplace(const HTuple& Index, const HTuple& ReplaceTuple) const

void HOperatorSetX.TupleReplace(
[in] VARIANT Tuple, [in] VARIANT Index, [in] VARIANT ReplaceTuple, [out] VARIANT* Replaced)

VARIANT HTupleX.TupleReplace(
[in] VARIANT Tuple, [in] VARIANT Index, [in] VARIANT ReplaceTuple)

static void HOperatorSet.TupleReplace(HTuple tuple, HTuple index, HTuple replaceTuple, out HTuple replaced)

HTuple HTuple.TupleReplace(HTuple index, HTuple replaceTuple)


tuple_replacetuple_replaceTupleReplacetuple_replaceTupleReplaceTupleReplace replaces one or more elements of the input tuple TupleTupleTupleTupleTupletuple and returns them with ReplacedReplacedReplacedReplacedReplacedreplaced. At this, IndexIndexIndexIndexIndexindex determines the indices of the elements and ReplaceTupleReplaceTupleReplaceTupleReplaceTupleReplaceTuplereplaceTuple the corresponding values to replace. The parameter IndexIndexIndexIndexIndexindex must contain one or more integer values (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 ReplaceTupleReplaceTupleReplaceTupleReplaceTupleReplaceTuplereplaceTuple contains only one value, this value will be replaced at all indices of IndexIndexIndexIndexIndexindex. If a value of IndexIndexIndexIndexIndexindex is greater than the length of the input tuple TupleTupleTupleTupleTupletuple, ReplacedReplacedReplacedReplacedReplacedreplaced will be extended accordingly and initialized with default values. For example, if TupleTupleTupleTupleTupletuple contains the values [0,0,0,1,1,1], the IndexIndexIndexIndexIndexindex contains the values [3,4,5,6] and the ReplaceTupleReplaceTupleReplaceTupleReplaceTupleReplaceTuplereplaceTuple contains the values [2,2,2,3], then the output tuple ReplacedReplacedReplacedReplacedReplacedreplaced will contain the values [0,0,0,2,2,2,3]. It is allowed to mix strings and numbers in the input tuples TupleTupleTupleTupleTupletuple and ReplaceTupleReplaceTupleReplaceTupleReplaceTupleReplaceTuplereplaceTuple.



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(-array) HTupleHTupleHTupleVARIANTHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double) (Hlong / double) (Hlong / double)

Index/Indices of elements to be replaced.

ReplaceTupleReplaceTupleReplaceTupleReplaceTupleReplaceTuplereplaceTuple (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 replace.

ReplacedReplacedReplacedReplacedReplacedreplaced (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 replaced elements.


tuple_selecttuple_selectTupleSelecttuple_selectTupleSelectTupleSelect, tuple_first_ntuple_first_nTupleFirstNtuple_first_nTupleFirstNTupleFirstN, tuple_last_ntuple_last_nTupleLastNtuple_last_nTupleLastNTupleLastN, tuple_select_masktuple_select_maskTupleSelectMasktuple_select_maskTupleSelectMaskTupleSelectMask, tuple_str_bit_selecttuple_str_bit_selectTupleStrBitSelecttuple_str_bit_selectTupleStrBitSelectTupleStrBitSelect, tuple_concattuple_concatTupleConcattuple_concatTupleConcatTupleConcat, tuple_select_ranktuple_select_rankTupleSelectRanktuple_select_rankTupleSelectRankTupleSelectRank

See also

tuple_removetuple_removeTupleRemovetuple_removeTupleRemoveTupleRemove, tuple_inserttuple_insertTupleInserttuple_insertTupleInsertTupleInsert



ClassesClassesClassesClasses | | | | Operators