tuple_selecttuple_selectTupleSelectTupleSelect (Operator)

Name

tuple_selecttuple_selectTupleSelectTupleSelect — Auswählen einzelner Elemente aus einem Tupel.

Signatur

tuple_select( : : Tuple, Index : Selected)

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

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

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

HTuple HTuple::TupleSelect(const HTuple& Index) const

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

HTuple HTuple.TupleSelect(HTuple index)

Beschreibung

tuple_selecttuple_selectTupleSelectTupleSelectTupleSelect wählt einzelne Elemente aus einem Tupel TupleTupleTupleTupletuple aus und liefert sie über den Parameter SelectedSelectedSelectedSelectedselected zurück. Der Parameter IndexIndexIndexIndexindex gibt hierbei einen oder mehrere Indizes an, über die festgelegt wird, welche Elemente ausgewählt werden. Folgerichtig darf IndexIndexIndexIndexindex ausschließlich ganze Zahlen beinhalten (falls IndexIndexIndexIndexindex eine Gleitkommazahl enthält, so muss diese eine ganze Zahl repräsentieren; alle Nachkommastellen der Zahl müssen also 0 sein). Tupelindizes werden 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_selecttuple_selectTupleSelectTupleSelectTupleSelect, die innerhalb eines Ausdrucks in der folgenden Syntax verwendet werden kann:

Selected := Tuple[Index]

Selected := subset(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(-array) HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Indizes der auszuwählenden Elemente.

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

Ausgewähltes Tupelelement.

Alternativen

tuple_first_ntuple_first_nTupleFirstNTupleFirstNTupleFirstN, tuple_last_ntuple_last_nTupleLastNTupleLastNTupleLastN, tuple_str_bit_selecttuple_str_bit_selectTupleStrBitSelectTupleStrBitSelectTupleStrBitSelect, tuple_concattuple_concatTupleConcatTupleConcatTupleConcat, tuple_select_rangetuple_select_rangeTupleSelectRangeTupleSelectRangeTupleSelectRange, tuple_select_ranktuple_select_rankTupleSelectRankTupleSelectRankTupleSelectRank

Siehe auch

tuple_removetuple_removeTupleRemoveTupleRemoveTupleRemove

Modul

Foundation