tuple_first_ntuple_first_nTupleFirstNTupleFirstN (Operator)
Name
tuple_first_ntuple_first_nTupleFirstNTupleFirstN — Select the first elements of a tuple up to the index “n”.
Signature
Description
tuple_first_ntuple_first_nTupleFirstNTupleFirstNTupleFirstN selects the first elements of TupleTupleTupleTupletuple
up to the index IndexIndexIndexIndexindex and returns them in SelectedSelectedSelectedSelectedselected.
Indices of tuple elements start at 0,
that means, the first tuple element has got the index 0. In total,
IndexIndexIndexIndexindex+1 elements are returned.
IndexIndexIndexIndexindex must contain a single integer value (or a floating point
number that represents an integer value without fraction).
Exception: Empty input tuple
If TupleTupleTupleTupletuple is empty, an exception is raised.
HDevelop In-line Operation
HDevelop provides an in-line operation for tuple_first_ntuple_first_nTupleFirstNTupleFirstNTupleFirstN,
which can be used in an expression in the following syntax:
Selected := firstn(Tuple, Index)
Execution Information
- Multithreading type: independent (runs in parallel even with exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
TupleTupleTupleTupletuple (input_control) tuple(-array) → HTupleHTupleHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)
Input tuple.
IndexIndexIndexIndexindex (input_control) integer → HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Index of the last element to select.
SelectedSelectedSelectedSelectedselected (output_control) tuple(-array) → HTupleHTupleHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)
Selected tuple elements.
Alternatives
tuple_last_ntuple_last_nTupleLastNTupleLastNTupleLastN,
tuple_selecttuple_selectTupleSelectTupleSelectTupleSelect,
tuple_str_bit_selecttuple_str_bit_selectTupleStrBitSelectTupleStrBitSelectTupleStrBitSelect,
tuple_concattuple_concatTupleConcatTupleConcatTupleConcat,
tuple_select_masktuple_select_maskTupleSelectMaskTupleSelectMaskTupleSelectMask
See also
tuple_removetuple_removeTupleRemoveTupleRemoveTupleRemove
Module
Foundation