Repeat for each

Marty Knapp martyknapp at comcast.net
Fri Nov 4 19:42:13 EST 2005


Mark Smith wrote:

> I tend to exclude rather than include in these situations, so  
> something like this?
>
> repeat for each line tLine in tData
>     if "word" is not in item 2 of tLine then next repeat
>     if item 4 of tLine <= 2 then next repeat
>     if item 8 of tLine <= 50 OR item 8 of tLine >= 500 then next repeat
>     put tLine & cr after subSet
>   end repeat
>
> this kind of loop is usually pretty fast.
>
> the repeat for loop effectively places each line in turn into the  
> variable "tLine", with the limitaion that changing tLine itself will  
> produce strange results, but it's contents can be read without problem.
>
Thanks for all the responses. I'll dive in and see how it goes.


Marty Knapp



More information about the use-livecode mailing list