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

Re: gnubol: Nested Conditionals, Extensions and Warnings



Randall Bart wrote:

> This brings up a question:  Do we need to warn extensions to COBOL-85 if
> the code is valid in the draft?  I say we don't -- what purpose would be
> served?

This is a COBOL 85 compiler. The reason is that we need to give people a simple
proposition as to what they are getting ie COBOL 85 (specific subset) + X.

If we position as somewhere between 85 and Draft Standard COBOL 4, then it will be
very difficult to communicate. Also, not being standards compliant is undesirable.

I intend to flag any extensions. Compliance requires flagging extensions that are
syntactically distinguishable. SC4 requires implementation of all features except
communications, including Report Writer (a useless feature IMO), whereas with
COBOL 85 you can do partial implementations and call yourself standards compliant.

> Re Various stuff about SEARCH/EVALUATE:
>
> I don't understand the issue.
>
> SEARCH
>      WHEN
>          EVALUATE
>              WHEN
>      WHEN
>
> is analogous to
>
> ADD
>      SIZE ERROR
>          SUBTRACT
>      NOT SIZE ERROR
>
> The rule (explicitly stated in the draft) is that the conditional phrase
> binds to the most recent antecedent that could use that phrase, regardless
> of what comes after.

The trouble is that while the size error constructs in arithmetic are the same,
the when clauses in evaluate and search are not the same, and k>1 lookahead is
needed to distinguish them, if it is possible at all..





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