Secrets of the filter command?
jerry at daniels-mara.com
Tue Jun 26 15:00:46 CDT 2007
That filter is used to get the comments that are actually names of
handler "folders" as well as the handler names in a script. We prefix
the names of groups of handlers (handler folders) with "--> " at the
beginning of a line outside a handler. Handler folders are optional
So this use of the filter command would yield any lines in a script
--> (comment used for handler folders)
It also handles any irregularities with regard to upper/lower case.
That part may actually be slowing it down, now that i think about it.
But it is necessary when using the filter command in this fashion.
My feeling in using this approach was that the repeat loops within
the binary engine of Revolution are faster then the repeat loops in a
script which often involve text (non-binary) callbacks to the engine.
That said, with the right repeat loop, I could be wrong, and, as I
said, the upper/lower case stuff does make the filter slower.
One thing for sure, I have replaced many lines of code with one.
On Jun 26, 2007, at 1:58 PM, David Bovill wrote:
> I've always been curious about the filter command - and I am pretty
> 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?
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the use-livecode