Re: Report enhancements

From: Rick Smith (ricksmith_at_mfi.net)
Date: 10/26/04


Date: Tue, 26 Oct 2004 17:37:38 -0400


"Lueko Willms" <l.willms@jpberlin.de> wrote in message
news:9JayJGauflB@jpberlin-l.willms.jpberlin.de...
[snip]
> The proper solution would be, as I pointed out already before, to
> allow an alternative to the "UNTIL phrase", namely the word "FOREVER",
> like in:

Or, perhaps, another discussed four years ago.
[snip]

On 2000/05/30,
http://groups.google.com/groups?q=+%22perform+with+no+test%22+author:ricksmi
th%40aiservices.com&hl=en&lr=&c2coff=1&selm=8h19m2%242ugp%241%40news.hitter.
net&rnum=1

In the next standard, not without some contrivance, such as
PERFORM UNTIL 1 = 0
That was the point of the last paragraph of my previous post,
[...].

Unconditional loops are provided by some vendors.

Merant / Micro Focus uses PERFORM UNTIL EXIT
but EXIT is a reserved word.

Another vendor uses PERFORM WITHOUT LIMIT
but WITHOUT is new and LIMIT is reserved.

What I may suggest to J4 is the addition to Format 2 of
PERFORM WITH NO TEST to indicate an unconditional loop.
Hence, the original example of MLE becomes,

PERFORM WITH NO TEST
    READ INPUT-FILE
        AT END
            EXIT PERFORM
    END-READ
    PERFORM RECORD-PROCESS
END-PERFORM

Very clean -- no flags -- no GO TO!
------
And, on 2001-07-22
http://groups.google.com/groups?q=+%22perform+with+no+test%22+author:ricksmi
th%40aiservices.com&hl=en&lr=&c2coff=1&selm=tlls2do3604faf%40corp.supernews.
com&rnum=2

The draft COBOL standard provides PERFORM ...
EXIT PERFORM ... END-PERFORM which may be used
to eliminate the paragraph-names that form the loop and
structure boundaries. However, the draft COBOL standard
has no syntax to identify the loop as indefinite, therefore
a condition such as UNTIL 1 = 0 is needed. I also mentioned
this, last year, and suggested PERFORM WITH NO TEST
as a means for identifying an indefinite loop.

While I discussed these issues in the newsgroup, I never
submitted a comment to J4 for their consideration.
-----



Relevant Pages

  • Re: Infinite Loops and Explicit Exits
    ... > CS> One of these proposals relaxes the current restriction that an EXIT ... > termination of the loop is not visible at that point. ... > terminating condition is visible in that context. ... > You now want to allow this remote procedure, ...
    (comp.lang.cobol)
  • Re: Various DOM-related wrappers (Code Worth Recommending Project)
    ... var start = ).getTime; ... sugar on top of what the browser offers. ... this was in a loop and I thought the join would be faster. ...
    (comp.lang.javascript)
  • Re: Houston-related rants was Re: forced merges/inside lane merges/AASHTO "tapered merges"
    ... >> Are you sure about the North Loop and I-45? ... >> in particular the westbound exit for Fondren/Gessner. ... How could HCTRA put an exit ramp for eastbound ... and the West Houston Center Blvd exit still shows Old Westheimer ...
    (misc.transport.road)
  • Re: Exit Do
    ... I've been instructed by a dot net / asp programmer that Exit Do is ... I am using nested loops and need to exit out of one loop into ... If Some Reason to stop loop then Exit Do ... Code Stage B ...
    (microsoft.public.scripting.vbscript)
  • Re: Exit Do
    ... I've been instructed by a dot net / asp programmer that Exit Do is ... I am using nested loops and need to exit out of one loop into ... Code Stage B ... likely to lead to bugs and readability problems. ...
    (microsoft.public.scripting.vbscript)