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 often wondered if there's a "hidden counter" somewhere that 
>Director uses when counting throough the items using 'repeat with 
>anItem in aList'? If so, can I check the value of that counter and 
>use it?
>
>No big deal, just curious.

yes, there's a hidden counter.

& if you want it, create it!

hiddenCounter = 0
repeat with anItem in aList
    hiddenCounter = hiddenCounter + 1
    put hiddenCounter
end


hth

-Buzz

>
>-A.
>
>
>
>[To remove yourself from this list, or to change to digest mode, go 
>to http://www.penworks.com/lingo-l.cgi  To post messages to the 
>list, email [EMAIL PROTECTED]  (Problems, email 
>[EMAIL PROTECTED]). Lingo-L is for learning and helping with 
>programming Lingo.  Thanks!]

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to