Repeat loop index

erik hansen erikhans08 at yahoo.com
Mon Jul 14 16:52:00 EDT 2003


good to know that what they used to teach in
Basic intro courses is still valid.

why should:

put (the number of lines in tText) into tTotal
repeat with i = 1 to tTotal
   doSomething(line i of tText)
end repeat

be any faster than:

put 0 into tCounter
repeat for each line of tText
  add 1 to tCounter
  doSomething(line tCounter of tText)
end repeat

?

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