2.2.3.24 patternT

Menu Information

Column: Fill Column With: Arbitrary set of Text Numeric values

Brief Information

Fill column with strings

Additional Information

Minimum Origin Version Required:9.1 SR0


Command Line Usage

1. patternT text:="Spring Summer Autumn Winter" onerepeat:=4 seqrepeat:=3;//Generate text series of "Spring Summer Autumn Winter", each text repeats 4 times and the whole data sequence repeats 3 times, the data sequence will be filled to the selected column(s).

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Input irng

Input

Range

<active>
Specifies the range of data columns you would like to fill values to.
Text to Repeat text

Input

string

Specify the value series you want to fill into the selected column(s). The values can be text or numbers. The separator between each value should be space. To include a space in one value, use quotation marks to indicate one value.
Mode mode

Input

int

0
Specify how the generated data should be arranged.

Option list:

  • 0:Repeat
    The values in the generated data sequence will be filled to the selected column(s) by ascending/descending order (When Inc is positive, will be in ascending order, when it is negative, will be in descending order). It is also possible to define the repeat times for each value and the whole sequence(onerepeat and seqrepeat) in the generated dataset to determine the dataset size.
  • 1:Random
    For each cell in the selected column, one value randomly picked from the generated data sequence will be filled into this cell. You can specify the value of size as the size of the generated dataset.
Repeat Times for Each Value onerepeat

Input

int

1
This variable is only controllable when the Mode variable is 0:Repeat. It specifies how many times each value repeats itself in the generated data sequence.
Repeat Times for The Sequence seqrepeat

Input

int

1
This variable is only controllable when the Mode variable is 0:Repeat. It specifies how many times each whole data sequence repeats itself in the generated dataset.
Total Number of Whole Set size

Input

int

10
This variable is only writable when the Mode variable is 1:Random. It specifies the total number of values in the whole dataset which will be generated based on the current setting.

Description

For GUI access of this function, see this help file.

Examples

  1. Create a new workbook and highlight the first column.
  2. Run the following script:
  3. string StrCities$="Boston "New York" Chicago";
    patternT text:=StrCities$;

    Note: if you need to include a string with space in the string sequence, you must first define the string sequence with quotation marks as a string and use this string variable in the patternT X-Function.

  4. Highlight the second column and run the following script:
  5. patternT text:=<[<"Washington DC" "New York" "San Francisco" "Los Angeles">]>;

    Note: the syntax <[< indicates the beginning of literal strings, and >]> indicates the end of literal strings.

Related X-Functions

patternN, patternD