tuple_last_ntuple_last_nTupleLastNTupleLastNtuple_last_n (算子)

名称

tuple_last_ntuple_last_nTupleLastNTupleLastNtuple_last_n — 选择从索引 “n” 到元组末尾的所有元素。

签名

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)

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]

描述

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

例外:空输入元组

If TupleTupleTupleTupletupletuple is empty, an exception is raised.

HDevelop 内联操作

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

Selected := lastn(Tuple, Index)

执行信息

参数

TupleTupleTupleTupletupletuple (输入控制)  tuple(-array) HTupleMaybeSequence[Union[float, int, str]]HTupleHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)

Input tuple.

IndexIndexIndexIndexindexindex (输入控制)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Index of the first element to select.

SelectedSelectedSelectedSelectedselectedselected (输出控制)  tuple(-array) HTupleSequence[Union[float, int, str]]HTupleHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)

Selected tuple elements.

替代

tuple_first_ntuple_first_nTupleFirstNTupleFirstNTupleFirstNtuple_first_n, tuple_selecttuple_selectTupleSelectTupleSelectTupleSelecttuple_select, tuple_str_bit_selecttuple_str_bit_selectTupleStrBitSelectTupleStrBitSelectTupleStrBitSelecttuple_str_bit_select, tuple_concattuple_concatTupleConcatTupleConcatTupleConcattuple_concat, tuple_select_masktuple_select_maskTupleSelectMaskTupleSelectMaskTupleSelectMasktuple_select_mask

另见

tuple_removetuple_removeTupleRemoveTupleRemoveTupleRemovetuple_remove

模块

基础