tuple_is_numbertuple_is_numberTupleIsNumberTupleIsNumbertuple_is_number (算子)
名称
tuple_is_numbertuple_is_numberTupleIsNumberTupleIsNumbertuple_is_number — 检查元组(字符串)是否表示数字。
签名
Herror tuple_is_number(double T, Hlong* IsNumber)
Herror T_tuple_is_number(const Htuple T, Htuple* IsNumber)
def tuple_is_number(t: MaybeSequence[Union[float, int, str]]) -> Sequence[int]
def tuple_is_number_s(t: MaybeSequence[Union[float, int, str]]) -> int
描述
tuple_is_numbertuple_is_numberTupleIsNumberTupleIsNumberTupleIsNumbertuple_is_number checks each element of the input tuple
TTTTtt 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.
例外:空输入元组
If the input tuple is empty, the operator returns an empty tuple.
HDevelop 内联操作
HDevelop provides an in-line operation for tuple_is_numbertuple_is_numberTupleIsNumberTupleIsNumberTupleIsNumbertuple_is_number,
which can be used in an expression in the following syntax:
IsNumber := is_number(T)
执行信息
- 多线程类型:独立(即使使用独占算子也能并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
TTTTtt (输入控制) tuple(-array) → HTupleMaybeSequence[Union[float, int, str]]HTupleHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)
Input tuple.
IsNumberIsNumberIsNumberIsNumberisNumberis_number (输出控制) integer(-array) → HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Tuple with Boolean numbers.
替代
tuple_is_inttuple_is_intTupleIsIntTupleIsIntTupleIsInttuple_is_int,
tuple_is_realtuple_is_realTupleIsRealTupleIsRealTupleIsRealtuple_is_real,
tuple_typetuple_typeTupleTypeTupleTypeTupleTypetuple_type,
tuple_is_nan_elemtuple_is_nan_elemTupleIsNanElemTupleIsNanElemTupleIsNanElemtuple_is_nan_elem
另见
tuple_numbertuple_numberTupleNumberTupleNumberTupleNumbertuple_number
模块
基础