[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: gnubol: A question



Bear in mind that in Boolean Geometry (if I remember correctly) that the order of evaluation is:-

1. = < >
2. NOT
3. AND
4. OR

Therefore, c < d AND e < f would be evaluated before a = b or (OR?) g.

I guess the answer is "define a rule and stick to it".

God help us all

Fred

-----Original Message-----
From:	Michael McKernan [SMTP:mck@tivoli.mv.com]
Sent:	Tuesday, 2 November 1999 14:44
To:	gnu-cobol@lusArs.net
Cc:	mck@tivoli.mv.com
Subject:	Re: gnubol: A question 

OK, I've gotten two of the three possible answers so far.  Is anyone
willing to defend the third one?

Chris says "Then, IMHO, it should fall down and die."

Fred says "...the second option is correct"

I tend to agree with Chris, Let's go on.  I see nothing in the
standard to indicate that abbreviation has any influence on grouping,
so if my example had been written without parentheses thusly

	IF a = b OR  c < d AND e < f OR g

we could probably agree that the implied last term is "e < g", right?
But the _implied_ grouping, because "and" binds more closely than "or",
must be just as it was written originally:

	IF a = b OR ( c < d AND e < f ) OR g

We are propagating the subject and relation from a factor to a term.
I guess that's the way it is, but it makes me a little
uncomfortable.  It also means, that if Fred is right, making the
implied grouping explicit, changes the semantics of the phrase
profoundly.  Now you can say "Ick", Chris.




--
This message was sent through the gnu-cobol mailing list.  To remove yourself
from this mailing list, send a message to majordomo@lusars.net with the
words "unsubscribe gnu-cobol" in the message body.  For more information on
the GNU COBOL project, send mail to gnu-cobol-owner@lusars.net.


--
This message was sent through the gnu-cobol mailing list.  To remove yourself
from this mailing list, send a message to majordomo@lusars.net with the
words "unsubscribe gnu-cobol" in the message body.  For more information on
the GNU COBOL project, send mail to gnu-cobol-owner@lusars.net.