Re: Infinite Loops and Explicit Exits
From: Chuck Stevens (charles.stevens_at_unisys.com)
Date: 11/02/04
- Next message: Rick Smith: "Re: Infinite Loops and Explicit Exits"
- Previous message: Chuck Stevens: "Re: Infinite Loops and Explicit Exits"
- In reply to: Lueko Willms: "Re: Infinite Loops and Explicit Exits"
- Next in thread: Lueko Willms: "Re: Infinite Loops and Explicit Exits"
- Reply: Lueko Willms: "Re: Infinite Loops and Explicit Exits"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 2 Nov 2004 12:48:24 -0800
"Lueko Willms" <l.willms@jpberlin.de> wrote in message
news:9K6g0sweflB@jpberlin-l.willms.jpberlin.de...
> . On 01.11.04
> wrote charles.stevens@unisys.com (Chuck Stevens)
> on /COMP/LANG/COBOL
> in cm63go$1780$1@si05.rsvl.unisys.com
> about Re: Infinite Loops and Explicit Exits
>
>
> CS> Those who suggest that GO TO, PERFORM THRU, and the use of SECTIONs
> CS> in COBOL should be archaized in, marked obsolete in, or eliminated
> CS> from the standard -- and these are the three steps in that process --
> CS> are.
>
> GOTO, PERFORM THRU yes, but SECTIONS no. The opposite makes sense.
> The first step to clean up the code is to put a SECTION header on top
> of that paragraph-thru-paragraph sentence and eliminate all the
> paragraph labels inbetween, restructuring that section into proper
> decision and repetition instructions.
>
> So one can by and by change such a program into something readable
> and maintainable.
Yes, you can. But do you wanna take on restructuring a 500,000-line
monolithic COBOL program to make that happen?
There are cases in which EXIT PERFORM is, I think, clearer than GO TO
<some-arbitrary-paragraph-somewhere>. Also, while I would argue that a
paragraph that might be the beginning of a PERFORM range, the end of a
PERFORM range, or somewhere in the middle of a PERFORM range in a given
program would be evidence of *questionable* style, the standard doesn't
prohibit it, and I would argue shouldn't prohibit it. I think EXIT PERFORM
adds readability, and it might not even be *possible* to determine "locally"
what the appropriate terminus of the PERFORM range is. Moreover,
*elegance* of coding style should not be dictated by the COBOL standard,
particularly when the requirements of elegance invalidate existing programs.
Matters of elegance are best left to the educators.
-Chuck Stevens
- Next message: Rick Smith: "Re: Infinite Loops and Explicit Exits"
- Previous message: Chuck Stevens: "Re: Infinite Loops and Explicit Exits"
- In reply to: Lueko Willms: "Re: Infinite Loops and Explicit Exits"
- Next in thread: Lueko Willms: "Re: Infinite Loops and Explicit Exits"
- Reply: Lueko Willms: "Re: Infinite Loops and Explicit Exits"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|