On Jul 14, 2011, at 12:05 AM, Keith Clarke wrote:
...so for a random selection, enforcing the use of all 6 items,
would this work?
put "1,2,3,4,5,6" into x
repeat until x is empty
put any item of x into y
do something
delete item y from x
end repeat
No, since the first pass could choose '2',
then the next pass could choose '6'
and produce the error "item 6 does not exist.
My preference would be to do the
put "1,2,3,4,5,6" into theNums
sort items of theNums numeric by random(1000000)
repeat for each item Y of theNums
do "some command" & Y
end repeat
Jim Ault
Las Vegas
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode