Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: RANDOM's & PICK's args

From: chalz:earthlink at: 21-Jan-2002 0:50

I think I'm late on this list, but herein lies a question I need answered, too.
> I was thinking that removing each string from balls, when picked, would > ensure that there were no duplicates, but I haven't tried yet. CLEAR,
> & REMOVE are like using a chainsaw, therefore I presume REPLACE is needed
> delete just one element from a series/block. How can REPLACE be used to
> leave a blank string in the block, so that it can't be picked? This would > also affect RANDOM's range the way I am using it.
My problem, usually, has been that when using a for loop on a series which gets altered, the loop fails to access the altered series/block, but continues to use the original. How do I go around this? (Ie, if I have [a b c d] and I run a for loop through it, when the loop reaches c, I want to append [e f g] to the block, and continue running the loop through e f g...) Does this make sense? Thanks everyone. --Charles