Skip to content

tuple_is_intTupleIsIntTupleIsInttuple_is_inttuple_is_int🔗

説明🔗

tuple_is_intTupleIsIntTupleIsInttuple_is_inttuple_is_int — tupleの内部表現がタイプintegerであるか調べる。

書式🔗

tuple_is_int( tuple T, out number IsInt )void TupleIsInt( const HTuple& T, HTuple* IsInt )static void HOperatorSet.TupleIsInt( HTuple t, out HTuple isInt )def tuple_is_int( t: HTupleType ) -> int

Herror tuple_is_int( const Hlong T, Hlong* IsInt )

Herror T_tuple_is_int( const Htuple T, Htuple* IsInt )

HTuple HTuple::TupleIsInt( ) const

HTuple HTuple.TupleIsInt( )

説明🔗

tuple_is_intTupleIsIntは入力tupleTttの内部表現が、 タイプintegerであるか調べます。 タイプがintegerである場合は、値 1(true)が IsIntisIntis_int に返され、 そうでない場合は、0(false)が返されます。 内部表現が H_TYPE_MIXED の場合、 tuple がinteger要素だけで構成される場合も、IsIntisIntis_int は 0 になります(詳細については tuple_typeTupleType を参照)。

例外: 入力tuple が 空🔗

入力tupleが空の場合、この関数は 1 を返します。

HDevelopインライン演算🔗

HDevelopは tuple_is_intTupleIsInt の代わりとなるインライン演算を備えており、以下の構文形式で使 用することができます::

IsInt := is_int(T)

注意🔗

全てのtuple要素がタイプintegerであっても、内部表現が H_TYPE_MIXED の場合、0(false)が返されます。 tupleの要素がタイプintegerであるか調べるためには、 オペレータtuple_is_int_elemTupleIsIntElemを使用するべきです。

実行情報🔗

実行情報
  • マルチスレッドタイプ: リエントラント(非排他なオペレーターと並列に動作)

  • マルチスレッドスコープ: グローバル(他のスレッドから呼び出される可能性あり)

  • 並列演算処理には未対応

パラメーター🔗

Ttt (input_control) tuple(-array) → (integer / real / string / handle)HTuple (Hlong / double / HString / HHandle)HTuple (int / long / double / string / HHandle)HTupleTypeHtuple (Hlong / double / char* / handle)

入力 tuple

IsIntisIntis_int (output_control) number → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

入力 tuple がタイプ integer であるかどうか

例🔗

(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

結果🔗

パラメーターが有効な場合、オペレーター tuple_is_intTupleIsInt は値 2 (H_MSG_TRUE) を返します。

他のオペレーターとの組み合わせ🔗

組み合わせ

他の選択候補

tuple_typeTupleType, tuple_is_numberTupleIsNumber, tuple_is_int_elemTupleIsIntElem

関連項目

tuple_is_realTupleIsReal, tuple_is_stringTupleIsString, tuple_is_handleTupleIsHandle

モジュール🔗

Foundation