randpick - return pseudo-random value of a variable

 

SYNOPSIS

<randpick $var>


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


DIAGNOSTICS
The randpick function returns a single 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: Sep 25 2019
Copyright © 2019 Thunderstone Software LLC. All rights reserved.