tuple_sem_typeT_tuple_sem_typeTupleSemTypeTupleSemTypetuple_sem_type (Operator)

Name

tuple_sem_typeT_tuple_sem_typeTupleSemTypeTupleSemTypetuple_sem_type — Zurückgeben den semantischen Typs eines Tupels.

Signatur

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

def tuple_sem_type(t: HTupleType) -> str

Beschreibung

tuple_sem_typetuple_sem_typeTupleSemTypeTupleSemTypeTupleSemTypetuple_sem_type gibt den semantischen Typ des Eingabetupels TTTTtt zurück. Der Typ wird als String in SemTypeSemTypeSemTypeSemTypesemTypesem_type zurückgegeben.

Falls TTTTtt nur gültige Handles des gleichen Typs enthält, wird dessen semantischer Typ zurückgegeben (z.B. 'matrix'"matrix""matrix""matrix""matrix""matrix"). Falls das Eingabetupel nur gültige und ungültige Handles oder Handles verschiedenen Typs enthält, wird 'handle'"handle""handle""handle""handle""handle" zurückgegeben. Falls TTTTtt Elemente verschiedenen Typs enthält, wird 'any'"any""any""any""any""any" zurückgegeben.

Sonderfall: Leeres Eingabetupel

Falls das Eingabetupel leer ist, gibt der Operator den Wert 'any'"any""any""any""any""any" zurück.

HDevelop Inline-Operation

HDevelop unterstützt eine Inline-Operation für tuple_sem_typetuple_sem_typeTupleSemTypeTupleSemTypeTupleSemTypetuple_sem_type, die innerhalb eines Ausdrucks in der folgenden Syntax verwendet werden kann:

SemType := sem_type(T)

Ausführungsinformationen

Parameter

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

Eingabetupel.

SemTypeSemTypeSemTypeSemTypesemTypesem_type (output_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Semantischer Typ des Eingabetupels als String.

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

Ergebnis

Sind die Parameterwerte korrekt, dann liefert tuple_sem_typetuple_sem_typeTupleSemTypeTupleSemTypeTupleSemTypetuple_sem_type den Wert 2 (H_MSG_TRUE).

Alternativen

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

Siehe auch

get_obj_classget_obj_classGetObjClassGetObjClassGetObjClassget_obj_class

Modul

Foundation