Repeat for each

Geoff Canyon gcanyon at inspiredlogic.com
Sat Nov 5 13:09:35 EST 2005


On Nov 5, 2005, at 1:19 AM, Ken Ray wrote:

> On 11/4/05 7:40 PM, "Geoff Canyon" <gcanyon at inspiredlogic.com> wrote:
>
>> On Nov 4, 2005, at 2:23 PM, Sarah Reichelt wrote:
>>
>>>   filter theData with "*word*"
>>
>> You could probably get just the lines with "word" in the second item
>> by doing something like this:
>>
>> filter theData with "*" & tab & "*word*" & tab & "*" & \
>>      tab & "*" & tab & "*" & tab & "*" & tab & "*" & tab & "*"
>
> Actually, you only need to add "*" right after the thing you're  
> checking,
> and shouldn't need any more "*"s, so this should work just as well:
>
>   filter theData with "*" & tab & "*word*" & tab & "*"

That filter would match any line where "word" was in any item from  
2-7 of 8. To nail it down to the second item the filter string has to  
include the tabs for all the items.

But since "repeat for each" is faster, the point is moot.

Except for the fact that filter should probably be bugzilla'd for  
being slow. Can anyone come up with an example where filter beats  
"repeat for each?"



More information about the use-livecode mailing list