Using the "or" operator with filter

Roger Eller roger.e.eller at sealedair.com
Thu Jul 11 13:50:08 EDT 2013


Thanks Richard.

To give a better picture of the requirements, the gCodes will be read from
a user editable preference file (.txt), so there could easily be 3 or more
(or less) items that have to be examined for each line of tList (a report
file).

At the moment, it works for the hard-coded 3 gCodes. That's why I tried
"or" in hopes of filtering them all in a single pass. I'm going to build a
smarter repeat that can adjust to the  number of items in gCodes.

~Roger


On Thu, Jul 11, 2013 at 1:18 PM, Richard Gaskin wrote:

> Roger Eller wrote:
>
>>
>> Perhaps I should just loop through each line checking if it 'contains' one
>> of the codes instead?
>>
>
> I would do that.
>
> Regex is handy at times, but it's a complex subsystem and notoriously slow
> with complex operators.
>
> I'll bet if you can first run a filter against the left-most column, a
> "repeat for each" on the remainder would likely be about as fast as you can
> get.
>
> Sometimes "repeat for each" on the whole thing is faster than "filter".
>
> --
>  Richard Gaskin
>  Fourth World
>  LiveCode training and consulting: http://www.fourthworld.com
>  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
>  Follow me on Twitter:  http://twitter.com/**FourthWorldSys<http://twitter.com/FourthWorldSys>



More information about the use-livecode mailing list