List Function

The $List function allows the user to specify a more complex type of lists than <...>.

There are two types of the function call. In the first case, the first parameter should be 'S' or 'SN'*. The function uses the following list as a set of value that will be used sequentially.

Examples

$List(S,1,2,3,4,5) will generate: 1,2,3,4,5,1,2,3,4,5,1,2,...

The second type of call allows the user to specify each value probability. The first parameter must be 'P' or 'PN'* in this case. Other parameters group to pair [pattern, probability]
The probability is an integer value between 0 and 100 where 0 means 'never' and 100 is 'always'.

* - N suffix means the value is not a pattern and should be used without processing.

Examples

  1. $List(PN,Y,90,N,10) - returns 90% of 'Y' value and 10% for 'N'.
  2. $List(P, 64,30, $Table(Customers,CompanyName),70) - uses sub-pattern "$Table(Customers,CompanyName)" with 70 percent probability.