Repeat loop index
erik hansen
erikhans08 at yahoo.com
Mon Jul 14 20:11:01 EDT 2003
--- Dar Scott <dsc at swcp.com> wrote:
> I think the situation is this:
>
> put (the number of lines in tText) into tTotal
> repeat with i = 1 to tTotal
> doSomething( i, line i of tText )
> -- use both # & line
> end repeat
>
> is slower than
>
> put 0 into tCounter
> repeat for each line tLine of tText
> add 1 to tCounter
> doSomething(tCounter, tLine)
> -- use both # & line
> end repeat
so tLine is the contents of the line?
i had thought tLine was a kind of
counter/pointer.
this is helping a lot, thanks.
Erik
=====
erik at erikhansen.org http://www.erikhansen.org
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
More information about the use-livecode
mailing list