Re: Report enhancements

From: William M. Klein (wmklein_at_nospam.netcom.com)
Date: 11/02/04


Date: Mon, 01 Nov 2004 23:45:59 GMT

The "GOBACK" functionality was explicitly disallowed in the '85 Standard, as

   EXIT PROGRAM
   STOP RUN

as a "sequence of statements" was explicitly illegal (and was/is the meaning of
GoBack)

EXIT PROGRAM in a "main" program has NEVER meant "STOP RUN".

-- 
Bill Klein
 wmklein <at> ix.netcom.com
"Lueko Willms" <l.willms@jpberlin.de> wrote in message 
news:9Jj8aVw9flB@jpberlin-l.willms.jpberlin.de...
>.    On  27.10.04
>  wrote  charles.stevens@unisys.com (Chuck Stevens)
>     on  /COMP/LANG/COBOL
>     in  clp68s$1jgu$1@si05.rsvl.unisys.com
>  about  Re: Report enhancements
>
>
> CS> If the justification for suggesting that there's a capability that
> CS> needs to be added to 20xx COBOL because it's not in 1985 COBOL, it
> CS> might be a good idea to see if that capability exists in the
> CS> *current* standard and/or the draft of the *next* one!
>
>   The functionality of GOBACK has long been in the COBOL standard by
> means of the EXIT statement -- so why has this duplication been added?
>
>
> CS> But it seems to me the "new way" of specifying this functionality --
> CS> be it PERFORM WITH NO TEST, PERFORM FOREVER, or PERFORM UNTIL
> CS> EXIT -- can be accomplished with 2002-compliant COBOL through
> CS> REPLACE with no adjustments to the syntax or to the reserved word
> CS> list (e.g., FOREVER).
>
>   It is not the same to specify a dummy condition test for entering a
> loop on the one hand and to specify that there is no test at all.
>
>   That a cute compiler and optimizer can prevent that dummy-condition
> being evaluated for every cycle of the loop, does not create the
> clarity of the program for a human reader.
>
>   I repeat what I had stated before: I don't feel an urgent need to
> have that functionality added, because I prefer loops to have their
> proper entry or exit condition at the beginning or the end, but not
> somewhere in the middle. But because the EXIT PERFORM is already in
> the standard (2002), and there _are_ situations where such a loop may
> be needed ... i.e. for the sake of completeness.
>
>
> Yours,
> Lüko Willms                                     http://www.willms-edv.de
> /--------- L.WILLMS@jpberlin.de -- Alle Rechte vorbehalten --
>
> Er trieb einen kleinen Finsternis-Handel. -G.C.Lichtenberg 


Relevant Pages

  • PERFORM FOREVER (was: Report enhancements)
    ... r> EXIT PERFORM is a MF ... But the 2002 standard does not have the PERFORM FOREVER. ... leaving the loop at one of the two ends of the looped sequence. ...
    (comp.lang.cobol)
  • Re: I miss loop
    ... I'm not sure but I suspect the functionality of the not in VB.net 2003 loop/continue statement would work more like the nested loops alternative than the goto alternative. ... In a nested loop situation the exit sub would exit the inner loop and therefore you'd re-enter the loop with any variables declared inside the loop being refreshed, for lack of a better word. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: I miss loop
    ... the goto go to the end of the loop, not the beginning, and you get exactly the functionality of a continue statement, no messy inner loop. ... if something exit do ...
    (microsoft.public.dotnet.languages.vb)
  • Re: counted loops (was: Toward a Forth thats easier to learn)
    ... combined with +LOOP). ... words and more functionality. ... M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html ... New standard: http://www.forth200x.org/forth200x.html ...
    (comp.lang.forth)
  • Re: Scope of EXIT FOR
    ... EXIT WHILE etc.). ... Take for example the following code which executes ... being inside a WHILE loop. ... The ANSI/ISO Standard program works without error. ...
    (comp.lang.basic.misc)