tuple_last_ntuple_last_nTupleLastNTupleLastN (Operator)

Name

tuple_last_ntuple_last_nTupleLastNTupleLastN — Select all elements from index “n” to the end of a tuple.

Signature

tuple_last_n( : : Tuple, Index : Selected)

Herror tuple_last_n(const Hlong Tuple, const Hlong Index, Hlong* Selected)

Herror T_tuple_last_n(const Htuple Tuple, const Htuple Index, Htuple* Selected)

void TupleLastN(const HTuple& Tuple, const HTuple& Index, HTuple* Selected)

HTuple HTuple::TupleLastN(const HTuple& Index) const

static void HOperatorSet.TupleLastN(HTuple tuple, HTuple index, out HTuple selected)

HTuple HTuple.TupleLastN(HTuple index)

Description

Starting with the “n-th” element of the tuple TupleTupleTupleTupletuple, tuple_last_ntuple_last_nTupleLastNTupleLastNTupleLastN selects every element of TupleTupleTupleTupletuple and returns it with SelectedSelectedSelectedSelectedselected. Thus, SelectedSelectedSelectedSelectedselected contains all elements of TupleTupleTupleTupletuple from index “n” up to the last element of TupleTupleTupleTupletuple (including the element at position “n”). The index “n” is determined by the input parameter IndexIndexIndexIndexindex. Thus, IndexIndexIndexIndexindex must contain a single integer value (if IndexIndexIndexIndexindex consists of a floating point number, this 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.

Exception: Empty input tuple

If TupleTupleTupleTupletuple is empty, an exception is raised.

HDevelop In-line Operation

HDevelop provides an in-line operation for tuple_last_ntuple_last_nTupleLastNTupleLastNTupleLastN, which can be used in an expression in the following syntax:

Selected := lastn(Tuple, Index)

Execution Information

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 first 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_first_ntuple_first_nTupleFirstNTupleFirstNTupleFirstN, 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