Random but unique, more info
Sarah
sarahr at genesearch.com.au
Sun Jan 12 17:58:00 EST 2003
It seems to me that everyone is being too complicated. What about:
sort lines of vChooseFrom by random(10000) -- or some suitably big
number
return line 1 to vNumToChoose of vChooseFrom
Cheers,
Sarah
On Sunday, January 12, 2003, at 06:23 am, tkuypers at pandora.be wrote:
> Ok, I believe I need to give some more info on this subject.
>
> VChooseFrom is a list containing numbers:
> 1
> 2
> 3
> 4
> 5
> 6
> 7
> 8
> 9
> 10
> 11
> 12
> and so on...
>
> VNumToChoose contains the number of lines to randomly select from
> VChooseFrom:
> 5
>
> How do I pick randomly five lines out of vChooseFrom, putting them into
> vSelected:
> 10
> 7
> 9
> 12
> 1
>
> If "1" is not in vSelected then put "1" and cr after vSelected won't
> work
> because "1" is in "10" and in "12"
>
>
> I hate these "small" problems, they take up so many time :-((
>
> Warm regards,
>
> Ton Kuypers
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list