KlassenKlassenKlassenKlassen | | | | Operatoren

tuple_is_inttuple_is_intTupleIsInttuple_is_intTupleIsIntTupleIsInt (Operator)

Name

tuple_is_inttuple_is_intTupleIsInttuple_is_intTupleIsIntTupleIsInt — Testen, ob die interne Repräsentation eines Tupels vom Typ integer (Ganzzahl) ist.

Signatur

tuple_is_int( : : T : IsInt)

Herror tuple_is_int(const Hlong T, Hlong* IsInt)

Herror T_tuple_is_int(const Htuple T, Htuple* IsInt)

Herror tuple_is_int(const HTuple& T, Hlong* IsInt)

void TupleIsInt(const HTuple& T, HTuple* IsInt)

HTuple HTuple::TupleIsInt() const

void HOperatorSetX.TupleIsInt(
[in] VARIANT T, [out] VARIANT* IsInt)

VARIANT HTupleX.TupleIsInt([in] VARIANT T)

static void HOperatorSet.TupleIsInt(HTuple t, out HTuple isInt)

HTuple HTuple.TupleIsInt()

Beschreibung

tuple_is_inttuple_is_intTupleIsInttuple_is_intTupleIsIntTupleIsInt testet, ob die interne Repräsentation des Eingabetupels TTTTTt vom Typ integer (Ganzzahl) ist. In diesem Fall wird 1 (true) zurückgegeben, ansonsten wird 0 (false) zurückgegeben. Falls ein Tupel nur aus Elementen des Typs integer besteht, kann IsIntIsIntIsIntIsIntIsIntisInt trotzdem gleich 0 sein, falls die interne Repräsentation des Tupels H_TYPE_MIXED ist; siehe tuple_typetuple_typeTupleTypetuple_typeTupleTypeTupleType für weitere Details.

Sonderfall: Leeres Eingabetupel

Falls das Eingabetupel leer ist, gibt der Operator 1 zurück.

HDevelop Inline-Operation

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

IsInt := is_int(T)

Achtung

Auch falls alle Elemente des Tupels vom Typ integer sind, liefert tuple_is_inttuple_is_intTupleIsInttuple_is_intTupleIsIntTupleIsInt 0 (false) zurück, falls die interne Repräsentation des Tupels vom Typ H_TYPE_MIXED ist. Um zu testen, ob die Elemente des Tupels vom Typ integer sind, sollte der Operator tuple_is_int_elemtuple_is_int_elemTupleIsIntElemtuple_is_int_elemTupleIsIntElemTupleIsIntElem verwendet werden.

Parallelisierung

Parameter

TTTTTt (input_control)  number(-array) HTupleHTupleHTupleVARIANTHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*) (Hlong / double / BSTR) (Hlong / double / char*)

Eingabetupel.

IsIntIsIntIsIntIsIntIsIntisInt (output_control)  number HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Ist das Eingabetupel vom Typ integer (Ganzzahl)?

Beispiel (HDevelop)

tuple_is_int ([3.1416,'pi',3], IsIntA)
* IsIntA = false
tuple_is_int ([1,2,3], IsIntB)
* IsIntB = true  
tuple_is_int ([], IsIntC)
* IsIntC = true

Ergebnis

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

Alternativen

tuple_typetuple_typeTupleTypetuple_typeTupleTypeTupleType, tuple_is_numbertuple_is_numberTupleIsNumbertuple_is_numberTupleIsNumberTupleIsNumber, tuple_is_int_elemtuple_is_int_elemTupleIsIntElemtuple_is_int_elemTupleIsIntElemTupleIsIntElem

Siehe auch

tuple_is_realtuple_is_realTupleIsRealtuple_is_realTupleIsRealTupleIsReal, tuple_is_stringtuple_is_stringTupleIsStringtuple_is_stringTupleIsStringTupleIsString

Modul

Foundation


KlassenKlassenKlassenKlassen | | | | Operatoren