Array.RandomValue |
Top Previous Next |
Returns a random entry from the given array.
Syntax function Array.RandomValue(AArray: array): variant
Description Returns a random entry from the given array, the elements can be of mixed types.
AArray holds a previously created array of any length.
The Return Value is a random element from the array.
Example execute UDSBlock returns (single_array_value varchar(100)) as begin array_value = Array.Create('zero', 'one', 'two'); single_array_value = Array.RandomValue(array_value); suspend; /* returns 'zero', 'one' or 'two' */
single_array_value = Array.RandomValue(array_value); suspend; /* returns 'zero', 'one' or 'two' */ end |