Skip to content

tuple_gen_constTupleGenConstTupleGenConsttuple_gen_consttuple_gen_const🔗

Short description🔗

tuple_gen_constTupleGenConstTupleGenConsttuple_gen_consttuple_gen_const — Generate a tuple of a specific length and initialize its elements.

Signature🔗

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 )

Description🔗

tuple_gen_constTupleGenConst generates a new tuple in Newtuplenewtuplenewtuple. The input parameter Lengthlengthlength determines the number of elements for the new tuple. Thus, Lengthlengthlength may only consist of a single number. If Lengthlengthlength contains a floating point number, this may only represent an integer value (without fraction). The data type and value of each element of the new generated tuple is determined by the input parameter ConstconstValconst that may only consist of a single element. All elements in Newtuplenewtuplenewtuple have got the same data type and value as the single element in ConstconstValconst.

Exception: Empty input tuples🔗

If any of the input tuples is empty, an exception is raised.

HDevelop In-line Operation🔗

HDevelop provides an in-line operation for tuple_gen_constTupleGenConst, which can be used in an expression in the following syntax:

Newtuple := gen_tuple_const(Length, Const)

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

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

Length of tuple to generate.

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

Constant for initializing the tuple elements.

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*)

New Tuple.

Combinations with other operators🔗

Combinations

Alternatives

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

See also

tuple_randTupleRand

Module🔗

Foundation