tuple_sem_typeT_tuple_sem_typeTupleSemTypeTupleSemType (Operator)

Name

tuple_sem_typeT_tuple_sem_typeTupleSemTypeTupleSemType — Return the semantic type of a tuple.

Signature

tuple_sem_type( : : T : SemType)

Herror T_tuple_sem_type(const Htuple T, Htuple* SemType)

void TupleSemType(const HTuple& T, HTuple* SemType)

HTuple HTuple::TupleSemType() const

HString HHandle::TupleSemType() const

static void HOperatorSet.TupleSemType(HTuple t, out HTuple semType)

HTuple HTuple.TupleSemType()

string HHandle.TupleSemType()

Description

tuple_sem_typetuple_sem_typeTupleSemTypeTupleSemTypeTupleSemType returns the semantic type of the input tuple TTTTt. The type is returned as a string value in the output parameter SemTypeSemTypeSemTypeSemTypesemType.

If TTTTt 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" is returned. If TTTTt contains elements of different types, 'any'"any""any""any""any" is returned.

Exception: Empty input tuple

If the input tuple is empty, the operator returns 'any'"any""any""any""any".

Execution Information

Parameters

TTTTt (input_control)  tuple(-array) HTupleHTupleHtuple (handle / real / integer / string) (HHandle / double / int / long / string) (HHandle / double / Hlong / HString) (handle / double / Hlong / char*)

Input tuple.

SemTypeSemTypeSemTypeSemTypesemType (output_control)  string HTupleHTupleHtuple (string) (string) (HString) (char*)

Semantic type of the input tuple as a string.

Example (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)

Result

If the parameters are valid, the operator tuple_sem_typetuple_sem_typeTupleSemTypeTupleSemTypeTupleSemType returns the value 2 (H_MSG_TRUE).

Alternatives

tuple_is_inttuple_is_intTupleIsIntTupleIsIntTupleIsInt, tuple_is_numbertuple_is_numberTupleIsNumberTupleIsNumberTupleIsNumber, tuple_is_realtuple_is_realTupleIsRealTupleIsRealTupleIsReal, tuple_is_stringtuple_is_stringTupleIsStringTupleIsStringTupleIsString, tuple_typetuple_typeTupleTypeTupleTypeTupleType

See also

get_obj_classget_obj_classGetObjClassGetObjClassGetObjClass

Module

Foundation