bug-gnucobol
[Top][All Lists]
Advanced

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

Re: [open-cobol-list] Bug in GnuCOBOL 1.1: reporting undefined paragraph


From: Alan Jump
Subject: Re: [open-cobol-list] Bug in GnuCOBOL 1.1: reporting undefined paragraph
Date: Mon, 24 Nov 2014 08:58:51 -0800

Let's try this again, since I managed to misdirect this to just Scott the first try.

Under GnuCOBOL 2.0 (compiled about a month and a half ago on Kubuntu 14.04.1):

$>cobc -x badperform.cob
badperform.cob: In paragraph '2000-do-some-stuff':
badperform.cob: Error: '3000-shut-down' is not defined
badperform.cob: Error: syntax error, unexpected end of file
Compilation failed.



- -
Alan Jump
address@hidden

No trees were harmed in the creation of this message, but a large number of electrons were terribly inconvenienced.

On Mon, Nov 24, 2014 at 8:49 AM, Scott McKellar <address@hidden> wrote:
When I PERFORM an undefined paragraph (probably because I mistyped the paragraph name, GnuCOBOL 1.1 reports my blunder, naturally.  However it attributes the error to the last paragraph in the program, not to the paragraph where the error actually occurs.

Consider the following minimal example:

       IDENTIFICATION DIVISION.
       PROGRAM-ID.  badperform.

       PROCEDURE DIVISION.

       0000-mainline.
           perform 1000-begin-job.
           perform 2000-do-stuff.   *> misspelled
           perform 3000-shut-down.
           STOP RUN.

       1000-begin-job.
           display 'I am starting up'.

       2000-do-some-stuff.
           display 'I am doing stuff'.

       3000-shut-down.
           display 'I am shutting down now'.



>cobc -x -Wall badperform.cob
badperform.cob: In paragraph '3000-shut-down':
badperform.cob:8: Error: '2000-do-stuff' undefined


The error should have been attributed to 0000-mainline, not to 3000-shut-down.  If GnuCOBOL can't keep track of where the error occurs, it shouldn't attribute it to any particular location; that's just needlessly misleading.


Environment: Red Hat 4.1.2.  I have not tried GnuCOBOL 2.0; maybe it behaves better in this regard.


Scott McKellar


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
open-cobol-list mailing list
address@hidden
https://lists.sourceforge.net/lists/listinfo/open-cobol-list


reply via email to

[Prev in Thread] Current Thread [Next in Thread]