Re: Report enhancements

From: Robert Wagner (spamblocker-robert_at_wagner.net)
Date: 10/28/04


Date: Thu, 28 Oct 2004 07:22:36 GMT

On 27 Oct 2004 20:15:33 -0700, riplin@Azonic.co.nz (Richard) wrote:

>I agree that PERFORM INDEFINITE TIMES should be a special case where
>INDEFINITE is a reserved word that acts as if the value is never
>reached, but for all practical purposes this can be used now without
>waiting for a standards change.
>
>(and isn't ugly like UNTIL ZERO NOT EQUAL ZERO).

This thread is like a debate over which brand of drain cleaner is best
tasting. All choices are ugly because there's no such thing as an
infinite loop. I want to see the _normal_ exit conditions in UNTIL,
for example PERFORM UNTIL USER-RESPONDED OR TIME-EXPIRED.

If there are exception conditions that can cause a premature exit, I
have no problem with using EXIT PERFORM in those cases.

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.

Having said that, I'm surprized no one suggested this, which works on
Micro Focus today:

  PERFORM UNTIL FALSE [AND ...]
  PERFORM UNTIL TRUE [OR ...]

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.



Relevant Pages

  • Re: Report enhancements
    ... extension beyond the '02 specification and the 2008 draft. ... rule (EXIT syntax rule 10 in the '02 standard, ... unextended COBOL I'd expect a syntax error. ... This execution-time determination is ...
    (comp.lang.cobol)
  • Re: Syntax error in Form
    ... > I have a form call Job Card. ... > gets added(only for the first time the form is opened). ... > when i enter the values again it is giving me "Syntax error in INSERT ... Whereas when i exit the form and open again it gets ...
    (microsoft.public.access.formscoding)
  • Re: how exit a block?
    ... You don't want to exit the block. ... inside the loop, and the each would just go on to the next iteration. ...
    (comp.lang.ruby)
  • Syntax error in Form
    ... I have a form call Job Card. ... added(only for the first time the form is opened). ... enter the values again it is giving me "Syntax error in INSERT INTO ... Whereas when i exit the form and open again it gets inserted. ...
    (microsoft.public.access.formscoding)
  • Re: time command, and $-, in Bourne shell
    ... where is my syntax error in the following program (in ... for opt in $-;do case $opt in ... If the above is in, say, file foo, then when I invoke "foo -e", I get ...
    (comp.unix.shell)