Re: lingo-l Just out of curiosity (repeat loop)

2002-09-25 Thread roy crisman
I'd also be careful of: repeat with i = 1 to thisList.count because this is depending upon thisList to not change size, and is actually slower than: iMax = thisList.count repeat with i = 1 to iMax because you're not accessing the .count of the list multiple times. roymeo [To remove

Re: lingo-l Just out of curiosity (repeat loop)

2002-09-22 Thread Mark A. Boyd
At 21:18 2002-09-21, Colin Holgate wrote: on repeatList aList repeat with i in aList put aList.getPos(i) end repeat end Buzz's hidden counter will work, but this one may fail. What happens if a later entry in the list is a repeat of an earlier entry? As I said in the sentence

Re: lingo-l Just out of curiosity (repeat loop)

2002-09-22 Thread Colin Holgate
As I said in the sentence immediately preceding that code, Of course, this will not work for lists with duplicate entries. Immediately following that code was a demonstration of what happens. To put it in words, getPos() will return the only first occurrence of the parameter supplied. You

lingo-l Just out of curiosity (repeat loop)

2002-09-21 Thread Andreas Gaunitz P11
In some cases it's convenient to use 'repeat with anItem in aList', to roll through the entries of a list. However, pretty often I realize I need a counter for one reason or other, so i resort to use 'repeat with itemCounter = 1 to aList.count'. I have often wondered if there's a hidden

Re: lingo-l Just out of curiosity (repeat loop)

2002-09-21 Thread Buzz Kettles
At 5:08 PM +0200 9/21/02, you wrote: In some cases it's convenient to use 'repeat with anItem in aList', to roll through the entries of a list. However, pretty often I realize I need a counter for one reason or other, so i resort to use 'repeat with itemCounter = 1 to aList.count'. I have

Re: lingo-l Just out of curiosity (repeat loop)

2002-09-21 Thread Colin Holgate
on repeatList aList repeat with i in aList put aList.getPos(i) end repeat end Buzz's hidden counter will work, but this one may fail. What happens if a later entry in the list is a repeat of an earlier entry? [To remove yourself from this list, or to change to digest mode, go to