tuple_type_elemtuple_type_elemTupleTypeElemTupleTypeElem (Operator)
Name
tuple_type_elemtuple_type_elemTupleTypeElemTupleTypeElem
— Return the types of the elements of a tuple.
Signature
tuple_type_elem( : : T : Types)
Herror tuple_type_elem(double T, Hlong* Types)
Herror T_tuple_type_elem(const Htuple T, Htuple* Types)
Description
tuple_type_elemtuple_type_elemTupleTypeElemTupleTypeElemTupleTypeElem
returns the types of the elements of the input tuple
TTTTt
. The types are returned separately as integer values in the output
parameter TypesTypesTypesTypestypes
. 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, the operator returns an empty tuple.
HDevelop In-line Operation
HDevelop provides an in-line operation for tuple_type_elemtuple_type_elemTupleTypeElemTupleTypeElemTupleTypeElem
,
which can be used in an expression in the following syntax:
Types := type_elem(T)
Execution Information
- Multithreading type: independent (runs in parallel even with exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
TTTTt
(input_control) tuple(-array) →
HTupleHTupleHtuple (real / integer / string / handle) (double / int / long / string / HHandle) (double / Hlong / HString / HHandle) (double / Hlong / char* / handle)
Input tuple.
TypesTypesTypesTypestypes
(output_control) number(-array) →
HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Types of the elements of the input tuple as integer values.
Example (HDevelop)
tuple_type_elem ([3.1416,'pi',3], Types)
* Types = [H_TYPE_REAL, H_TYPE_STRING, H_TYPE_INT]
Result
If the parameters are valid, the operator
tuple_type_elemtuple_type_elemTupleTypeElemTupleTypeElemTupleTypeElem
returns the value 2 (H_MSG_TRUE).
Alternatives
tuple_typetuple_typeTupleTypeTupleTypeTupleType
,
tuple_is_mixedtuple_is_mixedTupleIsMixedTupleIsMixedTupleIsMixed
,
tuple_is_inttuple_is_intTupleIsIntTupleIsIntTupleIsInt
,
tuple_is_realtuple_is_realTupleIsRealTupleIsRealTupleIsReal
,
tuple_is_stringtuple_is_stringTupleIsStringTupleIsStringTupleIsString
,
tuple_is_mixedtuple_is_mixedTupleIsMixedTupleIsMixedTupleIsMixed
,
tuple_is_int_elemtuple_is_int_elemTupleIsIntElemTupleIsIntElemTupleIsIntElem
,
tuple_is_real_elemtuple_is_real_elemTupleIsRealElemTupleIsRealElemTupleIsRealElem
,
tuple_is_string_elemtuple_is_string_elemTupleIsStringElemTupleIsStringElemTupleIsStringElem
See also
get_obj_classget_obj_classGetObjClassGetObjClassGetObjClass
,
tuple_is_numbertuple_is_numberTupleIsNumberTupleIsNumberTupleIsNumber
Module
Foundation