tuple_is_inttuple_is_intTupleIsIntTupleIsInttuple_is_int (Operator)

Name

tuple_is_inttuple_is_intTupleIsIntTupleIsInttuple_is_int — 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)

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

HTuple HTuple::TupleIsInt() const

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

HTuple HTuple.TupleIsInt()

def tuple_is_int(t: HTupleType) -> int

Beschreibung

tuple_is_inttuple_is_intTupleIsIntTupleIsIntTupleIsInttuple_is_int 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 IsIntIsIntIsIntIsIntisIntis_int trotzdem gleich 0 sein, falls die interne Repräsentation des Tupels H_TYPE_MIXED ist; siehe tuple_typetuple_typeTupleTypeTupleTypeTupleTypetuple_type 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_intTupleIsIntTupleIsIntTupleIsInttuple_is_int, 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_intTupleIsIntTupleIsIntTupleIsInttuple_is_int 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_elemTupleIsIntElemTupleIsIntElemTupleIsIntElemtuple_is_int_elem verwendet werden.

Ausführungsinformationen

Parameter

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

Eingabetupel.

IsIntIsIntIsIntIsIntisIntis_int (output_control)  number HTupleintHTupleHtuple (integer) (int / long) (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_intTupleIsIntTupleIsIntTupleIsInttuple_is_int den Wert TRUE.

Alternativen

tuple_typetuple_typeTupleTypeTupleTypeTupleTypetuple_type, tuple_is_numbertuple_is_numberTupleIsNumberTupleIsNumberTupleIsNumbertuple_is_number, tuple_is_int_elemtuple_is_int_elemTupleIsIntElemTupleIsIntElemTupleIsIntElemtuple_is_int_elem

Siehe auch

tuple_is_realtuple_is_realTupleIsRealTupleIsRealTupleIsRealtuple_is_real, tuple_is_stringtuple_is_stringTupleIsStringTupleIsStringTupleIsStringtuple_is_string, tuple_is_handletuple_is_handleTupleIsHandleTupleIsHandleTupleIsHandletuple_is_handle

Modul

Foundation