Secrets of the filter command?

Richard Gaskin ambassador at fourthworld.com
Tue Jun 26 15:19:45 EDT 2007


David Bovill wrote:
> I've always been curious about the filter command - and I am pretty sure
> from examples I have seen that there is a lot more to it than is shown in
> the docs.
> 
> Take this example from Jerry Daniels beautiful Galaxy:
> 
> filter someScript with "[-ofsgOFSG][-nueNUE][> ntNT]*"
> 
> 
> What is the leading "-" doing or the "> " ???
> 
> Does anyone know what the underlying mechanism to it is - and are there any
> links to a fuller documentation?

I tend to use the filter command only in its most simple forms, since a 
little benchmarking I did with it a couple years ago suggested that 
walking line by line was often faster for complex (multi-criteria) matches.

It might be handy if someone has time to benchmark the above example 
relative to an equivalent "repeat for each line..." example and see what 
we get.

-- 
  Richard Gaskin
  Managing Editor, revJournal
  _______________________________________________________
  Rev tips, tutorials and more: http://www.revJournal.com



More information about the use-livecode mailing list