Re: Perform loop enhancements

From: Richard (riplin_at_Azonic.co.nz)
Date: 10/29/04


Date: 28 Oct 2004 16:38:06 -0700


"Chuck Stevens" <charles.stevens@unisys.com> wrote

> "The execution of an EXIT PARAGRAPH statement causes control to be passed to
> an implicit CONTINUE statement immediately following the last explicit
> statement of the current paragraph, preceding any return mechanisms for that
> paragraph." EXIT PARAGRAPH would NOT terminate the execution of an
> out=of-line PERFORM, it'd just bypass the code that might have been executed
> from the point at which it occurred to the end of the perform range.

It certainly goes to the end of the paragraph, but this would only be
the end of the perform range if the perform was only of that
paragraph. If it was a PERFORM section then it may continue at the
next paragraph of that section.

An EXIT SECTION would end the current perform cycle if it was a
performed section and would, potentially, make the program go berzerk
if it was a performed paragraph.



Relevant Pages

  • Re: change variables
    ... Yes, but that is _your_ switch, not mine. ... put those 20 lines yet another paragraph and have Block-A perform it. ... I'm not frightened of indenting code. ... But I'm still not convinced that EXIT PARAGRAPH ...
    (comp.lang.cobol)
  • Re: Infinite Loops and Explicit Exits
    ... > coding changes are needed for a maintenance programmer to add a GO TO ... I think the addition of inline PERFORM in '85 COBOL, ... EXIT PARAGRAPH and EXIT SECTION are expressly ...
    (comp.lang.cobol)
  • Re: Avoiding Logic Error?
    ... Plinston, and what you are welcome to do. ... When a paragraph is controlled via a PERFORM, Mr Plinston - as it might ... When an EXIT PARAGRAPH is executed control is passed back to the invoking ...
    (comp.lang.cobol)
  • Re: Is it possible to use the value of the PROGRAM ID within the source code?
    ... Robert Wagner wrote in message ... >>defined as allowing for a GO TO which directed execution to the top of ... > If we had EXIT PARAGRAPH, there would be no excuse to perform THRU an exit ... Both EXIT PARAGRAPH and EXIT SECTION were added to ...
    (comp.lang.cobol)
  • Sections, Paragraphs, and related topics
    ... paragraph and/or exit paragraph) *OR* having all PARAGRAPHS is each an "equally ... to the '85 Standard or in the '02 Standard of doing an "immediate exit" from ... THRU - when sufficient safeguards are in effect to avoid other ... EXIT PARAGRAPH - as it avoids "potentially error-prone" labels - but accept ...
    (comp.lang.cobol)