tuple_sem_typeT_tuple_sem_typeTupleSemTypeTupleSemTypetuple_sem_type (算子名称)
名称
tuple_sem_typeT_tuple_sem_typeTupleSemTypeTupleSemTypetuple_sem_type — Return the semantic type of a tuple.
参数签名
Herror T_tuple_sem_type(const Htuple T, Htuple* SemType)
def tuple_sem_type(t: HTupleType) -> str
描述
tuple_sem_typetuple_sem_typeTupleSemTypeTupleSemTypeTupleSemTypetuple_sem_type returns the semantic type of the input tuple
TTTTtt.
The type is returned as a string value in the output parameter
SemTypeSemTypeSemTypeSemTypesemTypesem_type.
If TTTTtt contains only valid handles of the same type, the
corresponding semantic type of the handles is returned.
If it contains only valid or invalid handles,
or handles of different type, 'handle'"handle""handle""handle""handle""handle" is returned.
If TTTTtt contains elements of different types, 'any'"any""any""any""any""any" is
returned.
Exception: Empty input tuple
If the input tuple is empty, 该算子 returns 'any'"any""any""any""any""any".
HDevelop In-line Operation
HDevelop provides an in-line operation for tuple_sem_typetuple_sem_typeTupleSemTypeTupleSemTypeTupleSemTypetuple_sem_type,
which can be used in an expression in the following syntax:
SemType := sem_type(T)
运行信息
- Multithreading type: independent (runs in parallel even with exclusive operators).
- 多线程作用域:全局(可以从任何线程调用)。
- 未经并行化处理。
参数表
TTTTtt (input_control) tuple(-array) → HTupleHTupleTypeHTupleHtuple (handle / real / integer / string) (HHandle / double / int / long / string) (HHandle / double / Hlong / HString) (handle / double / Hlong / char*)
Input tuple.
SemTypeSemTypeSemTypeSemTypesemTypesem_type (output_control) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Semantic type of the input tuple as a string.
例程 (HDevelop)
create_matrix (3, 3, 0, MatrixID)
tuple_sem_type (MatrixID, SemType)
* SemType == 'matrix' (Handle of specific type)
clear_handle (MatrixID)
tuple_sem_type (MatrixID, SemType)
* SemType == 'handle' (Cleared handle)
tuple_sem_type ([MatrixID,123], SemType)
* SemType == 'any' (Mixed types)
结果
如果参数均有效,算子
tuple_sem_typetuple_sem_typeTupleSemTypeTupleSemTypeTupleSemTypetuple_sem_type 返回值 2 (
H_MSG_TRUE)
.
可替代算子
tuple_is_inttuple_is_intTupleIsIntTupleIsIntTupleIsInttuple_is_int,
tuple_is_numbertuple_is_numberTupleIsNumberTupleIsNumberTupleIsNumbertuple_is_number,
tuple_is_realtuple_is_realTupleIsRealTupleIsRealTupleIsRealtuple_is_real,
tuple_is_stringtuple_is_stringTupleIsStringTupleIsStringTupleIsStringtuple_is_string,
tuple_typetuple_typeTupleTypeTupleTypeTupleTypetuple_type
参考其它
get_obj_classget_obj_classGetObjClassGetObjClassGetObjClassget_obj_class
模块
Foundation