[thelist] Random, Not the same Random twice

Seyon evolt at delime.com
Fri Mar 19 18:21:55 CST 2004

Message from Russ (3/19/2004 06:06 PM)
>I'm attempting to assign a random value to 3 different variables; I
>don't want the variables to be able to have duplicates of the same value
>(ie, they shouldn't both pull the number 2).

I've done something like this before.

My non-programmer's not-at-all-elegant approach was to do a conditional 
loop to check on each of the latter two random numbers, if they matched one 
previously selected, choose again.


Trinidad Carnival in all its photographic glory. Playyuhself.com

More information about the thelist mailing list