Name
tuple_select_rangetuple_select_rangeTupleSelectRangetuple_select_rangeTupleSelectRangeTupleSelectRange — Select several elements of a tuple.
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.
Exception: Empty input tuples
If LeftindexLeftindexLeftindexLeftindexLeftindexleftindex and RightindexRightindexRightindexRightindexRightindexrightindex are empty tuples, the operator
returns an empty tuple. If only one of those parameters or TupleTupleTupleTupleTupletuple
is an empty tuple, an exception is raised.
HDevelop In-line Operation
HDevelop provides an in-line operation for tuple_select_rangetuple_select_rangeTupleSelectRangetuple_select_rangeTupleSelectRangeTupleSelectRange,
which can be used in an expression in the following syntax:
Selected := Tuple[Leftindex:Rightindex]
- Multithreading type: independent (runs in parallel even with exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
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.
Index of first element to select.
Index of last element to select.
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
tuple_removetuple_removeTupleRemovetuple_removeTupleRemoveTupleRemove
Foundation