randpick - return pseudo-random value of a variable

SYNOPSIS

<randpick $var>


DESCRIPTION
The randpick function returns a single pseudo-randomly-selected value of $var, as a string. The selection utilizes rand.


DIAGNOSTICS
The randpick function returns a single pseudo-randomly-selected value of $var, as a string.


EXAMPLE

<$colors = red orange yellow green blue violet>
<randpick $colors>
Roses are $ret.

The output might be:

Roses are green.


CAVEATS
The randpick function was added Nov. 7 1996.


SEE ALSO
rand, srand


Copyright © Thunderstone Software     Last updated: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.