|
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 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |