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

Re: gnubol: A question



Fred Neale wrote:

> In Christopher's example, most compilers would (or should) fall over as 'Z'
> would be a duplicated name, regardless of the fact that it is a
> CONDITION-NAME. Compilation would fail during working-storage parse.

    1) It wasn't my example.  It was transcribed from the paper at
<http://adam.wins.uva.nl/~x/coboldef/coboldef.html>.  Don't shoot the
messenger.  :-)

    2) Only one of the Z definitions would be included (the other was commented
out), the point was that the expression parses differently depending on which
definition of Z was included.

    (Wargh...  I just realized I deleted the second-level name...  Ah, here we
go...  Michael McKernan wrote)

> >  than later in he compilation.  The problem was cited by Christopher
> >  Clark and I have included the relevant part of his message at the end
> >  of this one.

    Ick.  I really must shorten that to Chris in my mailer.  I feel like I'm in
trouble now...

> >  My question is really about abbreviated conditionals, apart from this
> >  classic gotcha.  What effect do parenthesized expressions have on
> >  abbreviation?  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

    Then, IMHO, it should fall down and die.  Abbreviated conditionals (the `OR
g' portion) can only come immediately after a pure relational-condition (`a =
b'), according to every COBOL grammar I've got (CD 1.7 included).  `g' would
have to be an 88-level or a switch-condition, which look exactly identical in an
expression, but are declared in two different divisions of a source file.  (Have
I said Ick yet?  :-)  Ick, ick, ick, ick, ick.)

--
 Christopher Clark   compudata@cadvision.com   ICQ#9342023
 I don't even dream of being able to speak for my company...

When all you have is a nailgun, every problem looks like a messiah.




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