ClassesClassesClassesClasses | | | | Operators

tuple_select_rangetuple_select_rangeTupleSelectRangetuple_select_rangeTupleSelectRangeTupleSelectRange (Operator)

Name

tuple_select_rangetuple_select_rangeTupleSelectRangetuple_select_rangeTupleSelectRangeTupleSelectRange — Select several elements of a tuple.

Signature

tuple_select_range( : : Tuple, Leftindex, Rightindex : Selected)

Herror tuple_select_range(const Hlong Tuple, const Hlong Leftindex, const Hlong Rightindex, Hlong* Selected)

Herror T_tuple_select_range(const Htuple Tuple, const Htuple Leftindex, const Htuple Rightindex, Htuple* Selected)

Herror tuple_select_range(const HTuple& Tuple, const HTuple& Leftindex, const HTuple& Rightindex, Hlong* Selected)

Herror tuple_select_range(const HTuple& Tuple, const HTuple& Leftindex, const HTuple& Rightindex, HTuple* Selected)

void TupleSelectRange(const HTuple& Tuple, const HTuple& Leftindex, const HTuple& Rightindex, HTuple* Selected)

HTuple HTuple::TupleSelectRange(const HTuple& Leftindex, const HTuple& Rightindex) const

void HOperatorSetX.TupleSelectRange(
[in] VARIANT Tuple, [in] VARIANT Leftindex, [in] VARIANT Rightindex, [out] VARIANT* Selected)

VARIANT HTupleX.TupleSelectRange(
[in] VARIANT Tuple, [in] VARIANT Leftindex, [in] VARIANT Rightindex)

static void HOperatorSet.TupleSelectRange(HTuple tuple, HTuple leftindex, HTuple rightindex, out HTuple selected)

HTuple HTuple.TupleSelectRange(HTuple leftindex, HTuple rightindex)

Description

tuple_select_rangetuple_select_rangeTupleSelectRangetuple_select_rangeTupleSelectRangeTupleSelectRange selects several consecutive elements of the input tuple TupleTupleTupleTupleTupletuple and returns them with SelectedSelectedSelectedSelectedSelectedselected. At this, LeftindexLeftindexLeftindexLeftindexLeftindexleftindex determines the index of the first element and RightindexRightindexRightindexRightindexRightindexrightindex determines the index of the last element to select. Thus, both parameters LeftindexLeftindexLeftindexLeftindexLeftindexleftindex and RightindexRightindexRightindexRightindexRightindexrightindex must contain a single integer value (any floating point number must represent an integer value without fraction). Indices of tuple elements start at 0, that means, the first tuple element has got the index 0. The result tuple SelectedSelectedSelectedSelectedSelectedselected contains every element from the tuple TupleTupleTupleTupleTupletuple that has got an index between LeftindexLeftindexLeftindexLeftindexLeftindexleftindex and RightindexRightindexRightindexRightindexRightindexrightindex (including the elements at position LeftindexLeftindexLeftindexLeftindexLeftindexleftindex and RightindexRightindexRightindexRightindexRightindexrightindex). If the indices are equal, only one element is selected. In addition, it is possible that the right index is LeftindexLeftindexLeftindexLeftindexLeftindexleftindex - 1. In this case and if the left or right index are valid an empty tuple is returned. Hence, the index RightindexRightindexRightindexRightindexRightindexrightindex must be greater or equal to LeftindexLeftindexLeftindexLeftindexLeftindexleftindex - 1.

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.

LeftindexLeftindexLeftindexLeftindexLeftindexleftindex (input_control)  number(-array) HTupleHTupleHTupleVARIANTHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double) (Hlong / double) (Hlong / double)

Index of first element to select.

RightindexRightindexRightindexRightindexRightindexrightindex (input_control)  number(-array) HTupleHTupleHTupleVARIANTHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double) (Hlong / double) (Hlong / double)

Index of last element to select.

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

Selected tuple elements.

Alternatives

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

Module

Foundation


ClassesClassesClassesClasses | | | | Operators