Skip to content

tuple_last_nTupleLastNTupleLastNtuple_last_ntuple_last_nπŸ”—

Short descriptionπŸ”—

tuple_last_nTupleLastNTupleLastNtuple_last_ntuple_last_n β€” Select all elements from index β€œn” to the end of a tuple.

SignatureπŸ”—

tuple_last_n( tuple Tuple, integer Index, out tuple Selected )void TupleLastN( const HTuple& Tuple, const HTuple& Index, HTuple* Selected )static void HOperatorSet.TupleLastN( HTuple tuple, HTuple index, out HTuple selected )def tuple_last_n( tuple: MaybeSequence[Union[float, int, str]], index: int ) -> Sequence[Union[float, int, str]]

def tuple_last_n_s( tuple: MaybeSequence[Union[float, int, str]], index: int ) -> Union[float, int, str]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 )

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

HTuple HTuple.TupleLastN( HTuple index )

DescriptionπŸ”—

Starting with the β€œn-th” element of the tuple Tupletupletuple, tuple_last_nTupleLastN selects every element of Tupletupletuple and returns it with Selectedselectedselected. Thus, Selectedselectedselected contains all elements of Tupletupletuple from index β€œn” up to the last element of Tupletupletuple (including the element at position β€œn”). The index β€œn” is determined by the input parameter Indexindexindex. Thus, Indexindexindex must contain a single integer value (if Indexindexindex 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 Tupletupletuple is empty, an exception is raised.

HDevelop In-line OperationπŸ”—

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

Selected := lastn(Tuple, Index)

Execution informationπŸ”—

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

ParametersπŸ”—

Tupletupletuple (input_control) tuple(-array) β†’ (integer / real / string)HTuple (Hlong / double / HString)HTuple (int / long / double / string)MaybeSequence[Union[float, int, str]]Htuple (Hlong / double / char*)

Input tuple.

Indexindexindex (input_control) integer β†’ (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Index of the first element to select.

Selectedselectedselected (output_control) tuple(-array) β†’ (integer / real / string)HTuple (Hlong / double / HString)HTuple (int / long / double / string)Sequence[Union[float, int, str]]Htuple (Hlong / double / char*)

Selected tuple elements.

Combinations with other operatorsπŸ”—

Combinations

Alternatives

tuple_first_nTupleFirstN, tuple_selectTupleSelect, tuple_str_bit_selectTupleStrBitSelect, tuple_concatTupleConcat, tuple_select_maskTupleSelectMask

See also

tuple_removeTupleRemove

ModuleπŸ”—

Foundation