ID:176147
![]() Feb 13 2003, 1:07 am
|
|
To create a version of the pick() proc that works with associated lists. As in, list("value1"=200, "value2"=50) where value1 is four times as likely to be picked as value2... But I just can't seem to come up with any way to do this. Can anyone help?
|
Triste wrote:
To create a version of the pick() proc that works with associated lists. As in, list("value1"=200, "value2"=50) where value1 is four times as likely to be picked as value2... But I just can't seem to come up with any way to do this. Can anyone help? In fact such a proc already exists. Dream Tutor: Learn To Love Associative Lists Lummox JR |
I thought this was what you wanted, until I read the post again;
But I'm sure it could easily be altered to do what you want it to. It wouldn't be safe for me to do it right now, as I am too tired to do any real efficient coding.
Sorry I couldn't help more.
Also, this belongs in Newbie Central, for you do not have a current snip of coding you need help on.
~>Volte