ClassesClasses | | Operators

tuple_str_bit_selecttuple_str_bit_selectTupleStrBitSelectTupleStrBitSelect (Operator)

Name

tuple_str_bit_selecttuple_str_bit_selectTupleStrBitSelectTupleStrBitSelect — Select single character or bit from a tuple.

Signature

tuple_str_bit_select( : : Tuple, Index : Selected)

Herror tuple_str_bit_select(const char* Tuple, const Hlong Index, char* Selected)

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

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

HTuple HTuple::TupleStrBitSelect(const HTuple& Index) const

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

HTuple HTuple.TupleStrBitSelect(HTuple index)

Description

tuple_str_bit_selecttuple_str_bit_selectTupleStrBitSelectTupleStrBitSelectTupleStrBitSelect selects a single character or bit from a tuple TupleTupleTupleTupletuple of integer numbers and/or strings. The input parameter IndexIndexIndexIndexindex determines the character or bit position to select. IndexIndexIndexIndexindex must contain a single number. If IndexIndexIndexIndexindex contains a floating point number, this may only represent an integer value (without fraction). The result tuple SelectedSelectedSelectedSelectedselected contains a new element for each element of TupleTupleTupleTupletuple. Let IndexIndexIndexIndexindex contain the number “n” then each element of SelectedSelectedSelectedSelectedselected consists of the “n-th” character (for strings) or “n-th” bit (for integers) of the corresponding element of TupleTupleTupleTupletuple.

Exception: Empty input tuples

If TupleTupleTupleTupletuple is empty, an exception is raised.

HDevelop In-line Operation

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

Selected := Tuple{Index}

Execution Information

Parameters

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

Input tuple.

IndexIndexIndexIndexindex (input_control)  number HTupleHTupleHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double)

Position of character or bit to select.

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

Tuple containing the selected characters and bits.

Alternatives

tuple_selecttuple_selectTupleSelectTupleSelectTupleSelect, tuple_first_ntuple_first_nTupleFirstNTupleFirstNTupleFirstN, tuple_last_ntuple_last_nTupleLastNTupleLastNTupleLastN, tuple_concattuple_concatTupleConcatTupleConcatTupleConcat, tuple_strchrtuple_strchrTupleStrchrTupleStrchrTupleStrchr, tuple_strrchrtuple_strrchrTupleStrrchrTupleStrrchrTupleStrrchr, tuple_str_first_ntuple_str_first_nTupleStrFirstNTupleStrFirstNTupleStrFirstN, tuple_str_last_ntuple_str_last_nTupleStrLastNTupleStrLastNTupleStrLastN, tuple_substrtuple_substrTupleSubstrTupleSubstrTupleSubstr, tuple_andtuple_andTupleAndTupleAndTupleAnd, tuple_ortuple_orTupleOrTupleOrTupleOr, tuple_xortuple_xorTupleXorTupleXorTupleXor, tuple_nottuple_notTupleNotTupleNotTupleNot

See also

tuple_removetuple_removeTupleRemoveTupleRemoveTupleRemove

Module

Foundation


ClassesClasses | | Operators