dummy fields

Kenneth Brody kenbrody at spamcop.net
Wed Oct 20 20:36:58 PDT 2010


On 10/20/2010 5:56 PM, flowersoft at compuserve.com wrote:
> I've always been curious as to why the parser can't handle
> If: not not
> Where not is a label or
> If: not gt 6
> Where not is a long variable
> when it can handle some of the other much more complicated things mentioned.
> Maybe because the parser was written before long variables but then, I don't
> think it was written before labels, or was it?
[...]

Well, "not not" is a perfectly legal double-negation when used in something 
like "not not label".

The problem is that the ambiguity might not be able to be resolved until 
farther into the statement, and the parser doesn't handle that situation well.

Consider this obviously-contrived example:

    ---------    --------    -------
    not co eq or or ne lt or or co gt
        --------    --------    ------??

You can't disambiguate "not" until you reach the end-of-line, where you 
determine that it must be a label and not the negation operator.  I believe 
that "not" is the only possibly-ambiguous entity on the "if" line, and only 
when used at the start of a Boolean expression.

-- 
Kenneth Brody


More information about the Filepro-list mailing list