tuple_removetuple_removeTupleRemoveTupleRemovetuple_remove (Operator)

Name

tuple_removetuple_removeTupleRemoveTupleRemovetuple_remove — Eliminieren einzelner Elemente aus einem Tupel.

Signatur

tuple_remove( : : Tuple, Index : Reduced)

Herror tuple_remove(const Hlong Tuple, const Hlong Index, Hlong* Reduced)

Herror T_tuple_remove(const Htuple Tuple, const Htuple Index, Htuple* Reduced)

void TupleRemove(const HTuple& Tuple, const HTuple& Index, HTuple* Reduced)

HTuple HTuple::TupleRemove(const HTuple& Index) const

static void HOperatorSet.TupleRemove(HTuple tuple, HTuple index, out HTuple reduced)

HTuple HTuple.TupleRemove(HTuple index)

def tuple_remove(tuple: MaybeSequence[Union[float, int, str]], index: MaybeSequence[int]) -> Sequence[Union[float, int, str]]

def tuple_remove_s(tuple: MaybeSequence[Union[float, int, str]], index: MaybeSequence[int]) -> Union[float, int, str]

Beschreibung

tuple_removetuple_removeTupleRemoveTupleRemoveTupleRemovetuple_remove eliminiert einzelne Elemente aus einem Tupel TupleTupleTupleTupletupletuple und liefert die verbleibenden Elemente über den Parameter ReducedReducedReducedReducedreducedreduced zurück. Der Parameter IndexIndexIndexIndexindexindex enthält hierbei die Indizes der Elemente, die eliminiert werden sollen. Folgerichtig darf IndexIndexIndexIndexindexindex ausschließlich ganze Zahlen beinhalten (falls IndexIndexIndexIndexindexindex 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. Doppelte Indizes oder Indizes, die außerhalb des gültigen Bereichs liegen, werden ignoriert.

Sonderfall: Leeres Eingabetupel

Falls TupleTupleTupleTupletupletuple leer ist, gibt der Operator ein leeres Tupel zurück.

HDevelop Inline-Operation

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

Reduced := remove(Tuple, Index)

Ausführungsinformationen

Parameter

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

Eingabetupel.

IndexIndexIndexIndexindexindex (input_control)  integer(-array) HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Indizes der zu löschenden Elemente.

ReducedReducedReducedReducedreducedreduced (output_control)  tuple(-array) HTupleSequence[Union[float, int, str]]HTupleHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)

Verbleibende Tupelelemente.

Alternativen

tuple_first_ntuple_first_nTupleFirstNTupleFirstNTupleFirstNtuple_first_n, tuple_last_ntuple_last_nTupleLastNTupleLastNTupleLastNtuple_last_n, tuple_str_bit_selecttuple_str_bit_selectTupleStrBitSelectTupleStrBitSelectTupleStrBitSelecttuple_str_bit_select, tuple_concattuple_concatTupleConcatTupleConcatTupleConcattuple_concat, tuple_inserttuple_insertTupleInsertTupleInsertTupleInserttuple_insert, tuple_replacetuple_replaceTupleReplaceTupleReplaceTupleReplacetuple_replace

Siehe auch

tuple_selecttuple_selectTupleSelectTupleSelectTupleSelecttuple_select, tuple_select_masktuple_select_maskTupleSelectMaskTupleSelectMaskTupleSelectMasktuple_select_mask

Modul

Foundation