Skip to content

tuple_gen_constTupleGenConstTupleGenConsttuple_gen_consttuple_gen_const🔗

説明🔗

tuple_gen_constTupleGenConstTupleGenConsttuple_gen_consttuple_gen_const — 任意の長さの tuple を生成し要素を初期化する。

書式🔗

tuple_gen_const( number Length, tuple Const, out tuple Newtuple )void TupleGenConst( const HTuple& Length, const HTuple& Const, HTuple* Newtuple )static void HOperatorSet.TupleGenConst( HTuple length, HTuple constVal, out HTuple newtuple )def tuple_gen_const( length: Union[float, int], const: HTupleElementType ) -> Sequence[Union[float, int, str]]

def tuple_gen_const_s( length: Union[float, int], const: HTupleElementType ) -> Union[float, int, str]Herror tuple_gen_const( const Hlong Length, const Hlong Const, Hlong* Newtuple )

Herror T_tuple_gen_const( const Htuple Length, const Htuple Const, Htuple* Newtuple )

static HTuple HTuple::TupleGenConst( const HTuple& Length, const HTuple& Const )

static HTuple HTuple.TupleGenConst( HTuple length, HTuple constVal )

説明🔗

tuple_gen_constTupleGenConst は新しい tuple Newtuplenewtuplenewtuple を生成し ます。 入力パラメーター Lengthlengthlength は新しい tuple の要素数を決定しま す。従って Lengthlengthlength は 1 つの数だけで構成されていてもかまい ません。 もし Lengthlengthlength に浮動小数点数が含まれるなら、これは整数値だ けを表します(端数なし)。 新しく生成される tuple の各要素のデータの型と値は 1 つの要素から成 る入力パラメーター ConstconstValconst で決定されます。 Newtuplenewtuplenewtuple の全ての要素は ConstconstValconst の 1 つの要素によ って与えられる同じデータの型と値を持ちます。

例外: 入力tuple が 空🔗

もし入力tupleのいずれかが空の場合、例外が発生します。

HDevelopインライン演算🔗

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

Newtuple := gen_tuple_const(Length, Const)

実行情報🔗

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

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

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

パラメーター🔗

Lengthlengthlength (input_control) number → (integer / real)HTuple (Hlong / double)HTuple (int / long / double)Union[float, int]Htuple (Hlong / double)

生成する tuple の長さ

ConstconstValconst (input_control) tuple → (integer / real / string / handle)HTuple (Hlong / double / HString / HHandle)HTuple (int / long / double / string / HHandle)HTupleElementTypeHtuple (Hlong / double / char* / handle)

tuple の要素を初期化するための値

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

新しい tuple

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

組み合わせ

他の選択候補

tuple_str_bit_selectTupleStrBitSelect, tuple_selectTupleSelect, tuple_str_first_nTupleStrFirstN, tuple_str_last_nTupleStrLastN, tuple_concatTupleConcat, tuple_insertTupleInsert, tuple_replaceTupleReplace, tuple_gen_sequenceTupleGenSequence

関連項目

tuple_randTupleRand

モジュール🔗

Foundation