Selection set logic
Nancy Palmquist
nlp at vss3.com
Fri May 9 09:49:12 PDT 2008
Shane Gray wrote:
> I've noticed an issue in the past, but not spent time checking, with
> selection sets, in particular the selector sentence.
>
> Consider the following selection set:
>
> Group Field Heading Rel Value
> ------------------------------------------------------
>
> a . 1 . Branch ge . QL.
> b . 1 . Branch le . SS.
> c . 1 . Branch . AA.
> . . .
>
> ------------------------------------------------------
> Selector Sentence:
> a and b or c
>
> I believe the selector sentence should evaluate the same as "(a and b) or c"
> giving a result with all the branch codes from QL to SS as well as AA.
>
> It would however seem to evaluate the same as "a and (b or c)" giving a
> result with only branch codes between QL and SS. No AA.
>
> I have confirmed this by actually putting the parentheses in for both
> options. Is it that the selector sentence doesn't follow order of
> precedence?
>
> I have tested this up to 5.0.14 on SCO rclerk/rreport.
>
> Can anyone confirm this is an issue (or alternately that I am an imbecile).
> I could of course be just using it incorrectly.
>
Selector sentence follows Boolean order if you do not use parenthesis. It is
not LEFT to RIGHT. I know this but I do not remember which is first AND or OR.
I know NOT would be applied first, then as I think AND would be applied second
then OR last.
Since my memory is always confused, I always use parenthesis to insure it does
what I want.
I hate to leave defaults that could have a different agenda than I do.
In Conclusion, a and b or c is the same as (a and b) or c
But is not the same as a and (b or c)
Nancy
--
Nancy Palmquist MOS & filePro Training Available
Virtual Software Systems Web Based Training and Consulting
PHONE: (412) 835-9417 Web site: http://www.vss3.com
More information about the Filepro-list
mailing list