Repeat loop index

Richard Gaskin ambassador at fourthworld.com
Mon Jul 14 20:26:01 EDT 2003


erik hansen wrote:

>> 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.

Nope, it's the chunk itself.

Try some benchmarks between the two and you'll be quite surprised by how
fast it is...

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Developer of WebMerge 2.2: Publish any database on any site
 ___________________________________________________________
 Ambassador at FourthWorld.com       http://www.FourthWorld.com
 Tel: 323-225-3717                       AIM: FourthWorldInc




More information about the use-livecode mailing list