A86: Re: Howto Create distinct random-integer lists


[Prev][Next][Index][Thread]

A86: Re: Howto Create distinct random-integer lists




In a message dated 98-10-04 07:08:35 EDT, tejohhan@bergen.org writes:

<< here's the easiest way:
 Make two lists. The first list is the sequence of numbers that you want to
 'shuffle'. The second list is a list of random numbers. then sort both
 lists, using the random list as the 'sort key':
    Seq(X,X,1,10,1) STO L1
    Seq(Rand,X,1,10,1) STO L2
    SortA L2,L1 >>

Thanks John!

I'm impressed with this guy..
Now this is the best, shortest, and fastest way of doing this!  This is much
better than INFUZED or whatever his name was, but thanks for trying anyway
buddy....  
INFUZED, you need to stop be conceded and calling your self the GURU...

But this guy made a mistake the SortA is supposed to be Sortx...  The sortA
only has one argument, where as the sortx uses two lists to sort one list with
respect to another...... i would never have thought of anything like this!

Thanks again John Hanna!


~ mohsan