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

Re: gnubol: Siemans COBOL2000 - SEARCH and EVALUATE results




There is no disagreement here, and I appologize for causing a
misunderstanding.  When I wrote "As well it should" I was refering to
Mike's note on the location of the implicit END-EVALUATE being different in
the two cases.

Where diagnostics are issued, we certainly want them to be as informative
as possible.

However, in the second test, where there was no WHEN OTHER, and a period
properly terminated the sentence, except for possibly complaining *very
mildly* about the SEARCH not having an AT END phrase, there was nothing to
diagnose.  This is the more interesting case, because it demonstrates a
limitation on the parser's guidance to the programmer.  The program is
syntactically correct and semantically valid, but doesn't match the
intended function evident to the human eye.  Since we can't diagnose it, we
will just have to leave some work for providers of debuggers ;-)

Regards,
Jonathan

At 04:17 PM 12/13/99 EST, RKRayhawk@aol.com wrote:
>
>I disagree, fairly strongly.  If the diagnostic can indicate where an
assumed 
>implied termination occurs, it just about tells the coder where to put the 
>explicit terminator (in many cases). That enhances the coder's productivity. 
	<snip>
>So I think that an embedded unterminated EVALUATE that does have a WHEN
OTHER 
>should be diagnosed differently from one that doesn't even have that. And
the 
>way to manifest that distinction is to indicate the end point, as well as
the 
>start point.
>
>(So I agree with Michael and disagree with Jonathan, quoted in the following 
>interaction).
	<snip>
>In a message dated 12/13/99 3:16:08 PM EST, migrate@tiac.net writes:
>
><< At 11:14 AM 12/13/99 -0500, Michael McKernan wrote:
> >
> >I suspect that the terminator was not assumed at the same point in
> >each listing.  Too bad their diagnostic is not more specific.
> 
> As well it should not.  In the first case the WHEN OTHER tells the compiler
> *unambiguously* that an END-EVALUATE has to follow the next statement
> block.  In the second case, regardless of indentation (which means nothing
> in the free-form), the last WHEN rightly belongs as part of the EVALUATE
> and *not* as part of the SEARCH.
> 
> The period terminates all statements within the sentence (and the only
> thing to which I compare it, is the way a square bracket balances all
> unbalanced left parens in certain LISP implementations :-)
> 
> Regards,
> Jonathan
>  >>
>
>--
>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.
>
>
--------------------------------------------------------------------
J & C Migrations, Pty.          
566 Centre Street, Suite 3              http://www.jcmigrations.com
Newton, MA 02458                        Fax: +1 (617) 916-5113
USA                                     Tel. +1 (617) 916-5114

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