Re: Repeat for each item - should it be more robust ?

2006-02-12 Thread Mark Wieder
Alex- Sunday, February 12, 2006, 3:48:29 AM, you wrote: > When the docs explicitly say >> Important! You cannot change the labelVariable in a statement inside >> the loop. Doing so will cause a script error. > I think you should believe them :-) But note that BZ #3036 is open for voting. --

Re: Repeat for each item - should it be more robust ?

2006-02-12 Thread Martin Blackman
(tail between legs) well I guess we have agreement there then, thanks for reminding me about the docs! On 12/02/06, Alex Tweedly <[EMAIL PROTECTED]> wrote: > Martin Blackman wrote: > > >Try the following script - > > > >repeat for each item tItem in "apple,banana,broccoli" > >if tItem = "broccoli"

Re: Repeat for each item - should it be more robust ?

2006-02-12 Thread Alex Tweedly
Martin Blackman wrote: Try the following script - repeat for each item tItem in "apple,banana,broccoli" if tItem = "broccoli" then put " - vegetable" after tItem else put " - fruit" after tItem answer tItem end repeat Rev answers 'apple - fruit', 'apple - fruit' and 'broccolli - vegetable' (T

Re: Repeat for each item - should it be more robust ?

2006-02-12 Thread Mark Smith
Well this is why messing with the repeat variable is ill-advised! Not knowing exactly what the engine is doing while executing a repeat for loop means we have no way of predicting the results should we ill- advisedly mess with it. It seems that effectively lengthening the repeat variable cau

Re: Repeat for each item - should it be more robust ?

2006-02-12 Thread Klaus Major
Hi Martin, Try the following script - repeat for each item tItem in "apple,banana,broccoli" if tItem = "broccoli" then put " - vegetable" after tItem else put " - fruit" after tItem answer tItem end repeat Rev answers 'apple - fruit', 'apple - fruit' and 'broccolli - vegetable' (There is a

Repeat for each item - should it be more robust ?

2006-02-11 Thread Martin Blackman
Try the following script - repeat for each item tItem in "apple,banana,broccoli" if tItem = "broccoli" then put " - vegetable" after tItem else put " - fruit" after tItem answer tItem end repeat Rev answers 'apple - fruit', 'apple - fruit' and 'broccolli - vegetable' (There is an extra space in