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

Re: gnubol: A question



At 04:44 PM 11/1/99 , Michael McKernan wrote:
>for Randall Bart or whomever might have a defensible opinion.

Am I supposed to be flattered (I'm the person you ask for by name) or 
insulted (you think my opinions are indefensible).  B^)

>I'm looking at how we might resolve the syntactic ambiguity of
>abbreviated conditionals and condition names at parse time rather
>than later in he compilation.

I think the compilers I worked on parsed the expression as though the 
abbreviated conditions were booleans and unary operators, then fixed up the 
expression in the back end.

>If I encounter the following
>         IF a = b OR ( c < d AND e < f ) OR g
>and "g" is indeed a simple variable, should I interpret this to mean
>         IF a = b OR ( c < d AND e < f ) OR e < g

Correct, odd as it seems.

Whoever writes this code should pay attention the demands of COBOL-20XX 
with BOOLEAN fields.  BOOLEAN means bit field; what is called boolean in 
other languages is called conditional.  However, single bit BOOLEANs are 
interpreted as conditionals.  If g is a single bit BOOLEAN, then it's a 
conditional and there is no abbreviated condition.  If a is a BOOLEAN 
(single or multi-bit) then it can't be an abbreviated condition, so it's a 
syntax error if g isn't a conditional or one bit BOOLEAN.

--
RB |\  Randall Bart
aa |/  Barticus@usa.net 818-985-3259 Barticus@att.net
nr |\  8321 Burnet Av #1, North Hills, CA 91343
dt ||\
a   |/ Y2K website:    http://users.aol.com/PanicYr00
l   |\
l   |/ DOT-HS-808-065     I Love You    MS^7=6/28/107


--
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.