tuple_type_elemtuple_type_elemTupleTypeElemTupleTypeElemtuple_type_elem (算子名称)
名称
tuple_type_elemtuple_type_elemTupleTypeElemTupleTypeElemtuple_type_elem — Return the types of the elements of a tuple.
参数签名
tuple_type_elem( : : T : Types)
Herror tuple_type_elem(double T, Hlong* Types)
Herror T_tuple_type_elem(const Htuple T, Htuple* Types)
def tuple_type_elem(t: HTupleType) -> Sequence[int]
def tuple_type_elem_s(t: HTupleType) -> int
描述
tuple_type_elemtuple_type_elemTupleTypeElemTupleTypeElemTupleTypeElemtuple_type_elem returns the types of the elements of the input tuple
TTTTtt. The types are returned separately as integer values in the output
parameter TypesTypesTypesTypestypestypes. In HDevelop the corresponding constants are
defined:
-
H_TYPE_INT (1).
-
H_TYPE_REAL (2).
-
H_TYPE_STRING (4).
-
H_TYPE_HANDLE (16).
Exception: Empty input tuple
If the input tuple is empty, 该算子 returns an empty tuple.
HDevelop In-line Operation
HDevelop provides an in-line operation for tuple_type_elemtuple_type_elemTupleTypeElemTupleTypeElemTupleTypeElemtuple_type_elem,
which can be used in an expression in the following syntax:
Types := type_elem(T)
运行信息
- Multithreading type: independent (runs in parallel even with exclusive operators).
- 多线程作用域:全局(可以从任何线程调用)。
- 未经并行化处理。
参数表
TTTTtt (input_control) tuple(-array) → HTupleHTupleTypeHTupleHtuple (real / integer / string / handle) (double / int / long / string / HHandle) (double / Hlong / HString / HHandle) (double / Hlong / char* / handle)
Input tuple.
TypesTypesTypesTypestypestypes (output_control) number(-array) → HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Types of the elements of the input tuple as integer values.
例程 (HDevelop)
tuple_type_elem ([3.1416,'pi',3], Types)
* Types = [H_TYPE_REAL, H_TYPE_STRING, H_TYPE_INT]
结果
如果参数均有效,算子
tuple_type_elemtuple_type_elemTupleTypeElemTupleTypeElemTupleTypeElemtuple_type_elem 返回值 2 (
H_MSG_TRUE)
.
可替代算子
tuple_typetuple_typeTupleTypeTupleTypeTupleTypetuple_type,
tuple_is_mixedtuple_is_mixedTupleIsMixedTupleIsMixedTupleIsMixedtuple_is_mixed,
tuple_is_inttuple_is_intTupleIsIntTupleIsIntTupleIsInttuple_is_int,
tuple_is_realtuple_is_realTupleIsRealTupleIsRealTupleIsRealtuple_is_real,
tuple_is_stringtuple_is_stringTupleIsStringTupleIsStringTupleIsStringtuple_is_string,
tuple_is_mixedtuple_is_mixedTupleIsMixedTupleIsMixedTupleIsMixedtuple_is_mixed,
tuple_is_int_elemtuple_is_int_elemTupleIsIntElemTupleIsIntElemTupleIsIntElemtuple_is_int_elem,
tuple_is_real_elemtuple_is_real_elemTupleIsRealElemTupleIsRealElemTupleIsRealElemtuple_is_real_elem,
tuple_is_string_elemtuple_is_string_elemTupleIsStringElemTupleIsStringElemTupleIsStringElemtuple_is_string_elem
参考其它
get_obj_classget_obj_classGetObjClassGetObjClassGetObjClassget_obj_class,
tuple_is_numbertuple_is_numberTupleIsNumberTupleIsNumberTupleIsNumbertuple_is_number
模块
Foundation