Re: Infinite Loops and Explicit Exits
From: Howard Brazee (howard_at_brazee.net)
Date: 11/02/04
- Next message: Chuck Stevens: "Re: Report enhancements"
- Previous message: Howard Brazee: "Re: Infinite Loops and Explicit Exits"
- In reply to: Lueko Willms: "Re: Infinite Loops and Explicit Exits"
- Next in thread: Chuck Stevens: "Re: Infinite Loops and Explicit Exits"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 2 Nov 2004 17:28:34 GMT
On 2-Nov-2004, l.willms@jpberlin.de (Lueko Willms) wrote:
> I.e. it completely obfuscates the program flow. When reading such a
> piece of code with a "EXIT PERFORM" in the middle, which does not
> refer to a PERFORM ... END-PERFORM, one has not the slightest idea of
> the consequences of such statement.
>
> It should be avoided.
Think of a maintenance programmer.
PERFORM OLD-PARAGAPH VARYING...
...
...
PERFORM OLD-PARAGAPH VARYING...
...
...
PERFORM OLD-PARAGAPH VARYING...
OLD-PARAGRAPH.
...
...
...
IF FUNNY-CONDITION Get the hell out of Dodge...
...
...
...
The least intrusive way of coding "Get the Hell out of Dodge" is to exit the
perform. And "least intrusive" is a valuable characteristic of maintenance
programming.
- Next message: Chuck Stevens: "Re: Report enhancements"
- Previous message: Howard Brazee: "Re: Infinite Loops and Explicit Exits"
- In reply to: Lueko Willms: "Re: Infinite Loops and Explicit Exits"
- Next in thread: Chuck Stevens: "Re: Infinite Loops and Explicit Exits"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]