Re: Report enhancements
From: Chuck Stevens (charles.stevens_at_unisys.com)
Date: 10/28/04
- Next message: Chuck Stevens: "Re: Standard and COBOL file formats"
- Previous message: docdwarf_at_panix.com: "Re: OT: Christian Science an oxymoron (was Re: Standard and COBOL file formats)"
- In reply to: Robert Wagner: "Re: Report enhancements"
- Next in thread: Howard Brazee: "Perform loop enhancements"
- Reply: Howard Brazee: "Perform loop enhancements"
- Reply: Robert Wagner: "Re: Report enhancements"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 28 Oct 2004 08:51:50 -0700
"Robert Wagner" <spamblocker-robert@wagner.net> wrote in message
news:kb61o0trndv8m3torop3obncpp6og8od8o@4ax.com...
> The fact that no syntax works for out-of-line perform should tell you
> the concept is flawed. For example PERFORM FOO UNTIL EXIT is truly an
> infinite loop, therefore a bug (without a GO TO). I would expect the
> compiler to diagnose it as syntax error.
I haven't yet seen the reasons "EXIT PERFORM" was precluded from use within
out-of-line PERFORM ranges. As I stated before, our implementation allows
this as an extension. Upon execution of an EXIT PERFORM, the "innermost"
active PERFORM in the program is exited, and if there isn't one, execution
proceeds to the next statement as if CONTINUE had been coded.
I agree that an out-of-line indefinite PERFORM pretty much requires either
the despised GO TO or the prohibited EXIT PERFORM, but I'm not really
opposed to relaxing the restriction on the latter, unless someone convinces
me that there's a good reason why it's there. .
> Having said that, I'm surprized no one suggested this, which works on
> Micro Focus today:
>
> PERFORM UNTIL FALSE [AND ...]
> PERFORM UNTIL TRUE [OR ...]
Yes, TRUE and FALSE are reserved words as early as ANSI X3.23-1985,
introduced, I believe, in support of EVALUATE. To this the 2002 standard
added the use of FALSE in the VALUE clause of 88-level items (WHEN SET TO
FALSE) and both values in the SET statement for 88's. Adding "PERFORM
UNTIL FALSE" would not require new reserved words.
> They could legitimately be used in debugging, similar to IF FALSE AND
> ... to temporarily comment out code and IF TRUE OR ... to make it
> execute unconditionally.
I'm not sure what you mean by :"IF FALSE [or TRUE] AND ..." specifically as
it relates to COBOL; these are extensions as well. TRUE/FALSE are allowed
only in the contexts mentioned above, so far as I know, in '02 COBOL.
n-names (88's); (2) in EVALUATE; and (3) SET <condition-name>. You can
accomplish much the same thing with directives in '02 COBOL.
Note that I do understand the point; we use "IF FALSE ..." and "WHILE FALSE
... " constructs all the time in ALGOL and its relatives and descendants for
exactly this purpose, by the way.
-Chuck Stevens
- Next message: Chuck Stevens: "Re: Standard and COBOL file formats"
- Previous message: docdwarf_at_panix.com: "Re: OT: Christian Science an oxymoron (was Re: Standard and COBOL file formats)"
- In reply to: Robert Wagner: "Re: Report enhancements"
- Next in thread: Howard Brazee: "Perform loop enhancements"
- Reply: Howard Brazee: "Perform loop enhancements"
- Reply: Robert Wagner: "Re: Report enhancements"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|