Skip to content

tuple_addTupleAddTupleAddtuple_addtuple_add🔗

説明🔗

tuple_addTupleAddTupleAddtuple_addtuple_add — 2 つの tuple を足す。

書式🔗

tuple_add( tuple S1, tuple S2, out tuple Sum )void TupleAdd( const HTuple& S1, const HTuple& S2, HTuple* Sum )static void HOperatorSet.TupleAdd( HTuple s1, HTuple s2, out HTuple sum )def tuple_add( s1: MaybeSequence[Union[float, int, str]], s2: MaybeSequence[Union[float, int, str]] ) -> Sequence[Union[float, int, str]]

def tuple_add_s( s1: MaybeSequence[Union[float, int, str]], s2: MaybeSequence[Union[float, int, str]] ) -> Union[float, int, str]Herror tuple_add( double S1, double S2, double* Sum )

Herror T_tuple_add( const Htuple S1, const Htuple S2, Htuple* Sum )

HTuple HTuple::TupleAdd( const HTuple& S2 ) const

HTuple HTuple.TupleAdd( HTuple s2 )

説明🔗

tuple_addTupleAdd は、入力 tuple S1s1s1 および S2s2s2 の 合計を計算します。両方の tuple が同じ長さを持つなら、両方の tuple の対応する要素が加算されます。そうでない場合、S1s1s1 または S2s2s2 は長さ 1 になる必要があります。長い tuple のそれぞれの 要素に 1 つの要素の tuple が足されます。2 つの整数が足されたら結果 は整数です。実数が他の数値に足されたら結果は実数です。2 つの文字が 足されたら文字の連結となります。数値と文字が足されたら数値は文字へ 変換されます。即ちその場合は文字の連結と一致します。

例外: 入力tuple が 空🔗

どちらかの、または両方の入力tupleが空の場合、この関数は空のtupleを返します。

HDevelopインライン演算🔗

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

Sum := S1 + S2

S1s1s1 と S2s2s2 が文字列を含んでいた場合、+演算は 文字列の連結 を行います。

実行情報🔗

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

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

  • 内部データレベルで自動的に並列演算処理を実施

パラメーター🔗

S1s1s1 (input_control) tuple(-array) → (real / integer / string)HTuple (double / Hlong / HString)HTuple (double / int / long / string)MaybeSequence[Union[float, int, str]]Htuple (double / Hlong / char*)

入力 tuple 1

S2s2s2 (input_control) tuple(-array) → (real / integer / string)HTuple (double / Hlong / HString)HTuple (double / int / long / string)MaybeSequence[Union[float, int, str]]Htuple (double / Hlong / char*)

入力 tuple 2

Sumsumsum (output_control) tuple(-array) → (real / integer / string)HTuple (double / Hlong / HString)HTuple (double / int / long / string)Sequence[Union[float, int, str]]Htuple (double / Hlong / char*)

入力 tuple 和

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

組み合わせ

他の選択候補

tuple_subTupleSub

関連項目

tuple_cumulTupleCumul

モジュール🔗

Foundation