From: "Patrick"
> I want to get values in order from a block, the first value 
> coming again after the last, and this forever. Is there a 
> better way than the one I am using now ?
>
> colors: [red green blue]
> 
> ; I want color to be red, then green, then blue, then red again forever
> ; the first value is duplicated
> 
> color: first colors
> append colors color
> 
> ; then forever
> color: select colors color

Hi, Patrick,

This is just a slight variation:

colors: [red green blue]
color: first colors
loop 100 [
    if not color: select colors color [color: first colors]
    print color
]

Of course, 'forever is substituted in place of 'loop.
--Scott Jones

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to