tuple_last_ntuple_last_nTupleLastNTupleLastN (Operator)

Name

tuple_last_ntuple_last_nTupleLastNTupleLastN — Auswählen aller Elemente ab Index „n“ bis um Ende eines Tupels.

Signatur

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)

Beschreibung

tuple_last_ntuple_last_nTupleLastNTupleLastNTupleLastN wählt die hinteren Elemente des Tupels TupleTupleTupleTupletuple aus und liefert sie in dem Ausgabetupel SelectedSelectedSelectedSelectedselected zurück. SelectedSelectedSelectedSelectedselected enthält dann alle Elemente des Tupels TupleTupleTupleTupletuple ab dem „n-ten“ Element (inklusive des „n-ten“ Elements). Der Index „n“ wird durch den Parameter IndexIndexIndexIndexindex festgelegt. Folgerichtig muss IndexIndexIndexIndexindex eine ganze Zahl beinhalten (falls IndexIndexIndexIndexindex eine Gleitkommazahl enthält, so muss diese eine ganze Zahl repräsentieren; alle Nachkommastellen der Zahl müssen also 0 sein). Der Index eines Tupelelements wird beginnend mit 0 gezählt, das heißt, das erste Tupelelement wird über den Index 0 ausgewählt.

Sonderfall: Leeres Eingabetupel

Falls TupleTupleTupleTupletuple leer ist, wird eine Fehlermeldung angezeigt.

HDevelop Inline-Operation

HDevelop unterstützt eine Inline-Operation für tuple_last_ntuple_last_nTupleLastNTupleLastNTupleLastN, die innerhalb eines Ausdrucks in der folgenden Syntax verwendet werden kann:

Selected := lastn(Tuple, Index)

Ausführungsinformationen

Parameter

TupleTupleTupleTupletuple (input_control)  tuple(-array) HTupleHTupleHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)

Eingabetupel.

IndexIndexIndexIndexindex (input_control)  integer HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Index des ersten auszuwählenden Elements.

SelectedSelectedSelectedSelectedselected (output_control)  tuple(-array) HTupleHTupleHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)

Ausgewählte Tupelelemente.

Alternativen

tuple_first_ntuple_first_nTupleFirstNTupleFirstNTupleFirstN, tuple_selecttuple_selectTupleSelectTupleSelectTupleSelect, tuple_str_bit_selecttuple_str_bit_selectTupleStrBitSelectTupleStrBitSelectTupleStrBitSelect, tuple_concattuple_concatTupleConcatTupleConcatTupleConcat, tuple_select_masktuple_select_maskTupleSelectMaskTupleSelectMaskTupleSelectMask

Siehe auch

tuple_removetuple_removeTupleRemoveTupleRemoveTupleRemove

Modul

Foundation