tuple_is_numbertuple_is_numberTupleIsNumberTupleIsNumbertuple_is_number (Operator)

Name

tuple_is_numbertuple_is_numberTupleIsNumberTupleIsNumbertuple_is_number — Check a tuple (of strings) whether it represents numbers.

Signature

tuple_is_number( : : T : IsNumber)

Herror tuple_is_number(double T, Hlong* IsNumber)

Herror T_tuple_is_number(const Htuple T, Htuple* IsNumber)

void TupleIsNumber(const HTuple& T, HTuple* IsNumber)

HTuple HTuple::TupleIsNumber() const

static void HOperatorSet.TupleIsNumber(HTuple t, out HTuple isNumber)

HTuple HTuple.TupleIsNumber()

def tuple_is_number(t: MaybeSequence[Union[float, int, str]]) -> Sequence[int]

def tuple_is_number_s(t: MaybeSequence[Union[float, int, str]]) -> int

Description

tuple_is_numbertuple_is_numberTupleIsNumberTupleIsNumbertuple_is_number checks each element of the input tuple TTTtt whether it represents a number. If the element is a number (real or integer), 1 is returned for that element. If the element is a string, it is checked whether the string represents a number. If so, 1 is returned, otherwise 0.

Exception: Empty input tuple

If the input tuple is empty, the operator returns an empty tuple.

HDevelop In-line Operation

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

IsNumber := is_number(T)

Execution Information

Parameters

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

Input tuple.

IsNumberIsNumberIsNumberisNumberis_number (output_control)  integer(-array) HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Tuple with Boolean numbers.

Alternatives

tuple_is_inttuple_is_intTupleIsIntTupleIsInttuple_is_int, tuple_is_realtuple_is_realTupleIsRealTupleIsRealtuple_is_real, tuple_typetuple_typeTupleTypeTupleTypetuple_type, tuple_is_nan_elemtuple_is_nan_elemTupleIsNanElemTupleIsNanElemtuple_is_nan_elem

See also

tuple_numbertuple_numberTupleNumberTupleNumbertuple_number

Module

Foundation