Matchtext script results

Mark Smith mark at
Thu Nov 30 18:54:07 EST 2006

Not that it necessarily matters for your application, but your  
version will miss a match if it's preceded or followed by punctuation  
-- "cat."  "(dinosaur)" etc.

By an unnecessary process of elimination, I arrived at just about  
exactly the same simple solution as you did in my last attempt, but  
dealing with punctuation detracts (inevitably, as far as I can see)  
from the speed.

And we didn't even consider plurals!



On 30 Nov 2006, at 23:07, J. Landman Gay wrote:

> The last one in the list is the one I thought I had to replace with  
> something faster. It is simply this:
>   repeat for each line l in tFiles
>     put url ("file:" & l) into tText
>     repeat for each word w in pWords
>       put w is among the words of tText into tMatch
>       if tMatch = false then exit repeat
>     end repeat
>     if tMatch then put l & cr after tList
>   end repeat
> And that is what surprised me -- that no tinkering with arrays, or  
> matchtext, or anything else is faster than the most straightforward  
> Revolution syntax. I was thinking this would take a long time, but  
> in fact it is the fastest way to do it (that I've seen so far,  
> anyway.) We've mentioned this on the list before, but I guess I  
> need to be hit on the head with the facts occasionally, just to  
> remind me how good we've got it.
> Surprise. Rev wins out again.
> -- 
> Jacqueline Landman Gay         |     jacque at
> HyperActive Software           |
> _______________________________________________
> use-revolution mailing list
> use-revolution at
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:

More information about the Use-livecode mailing list