Re: newbie question on cobol syntax



The Standard doesn't allow a NEXT SENTENCE with an END-IF (at the same level, so
this is "non-Standard". However, a number of vendors allow this (as a
documented extension).

--
Bill Klein
wmklein <at> ix.netcom.com
"LX-i" <lxi0007@xxxxxxxxxxxx> wrote in message
news:I76dnQUjPPpo9LDbnZ2dnUVZ_sTinZ2d@xxxxxxxxxxxxxx
Richard wrote:
On Apr 24, 3:58 am, Howard Brazee <how...@xxxxxxxxxx> wrote:
I've heard of, but haven't come across code that used "next sentence"
to work as "exit paragraph".

paragraph-a.
if my-account = "zzzz"
next sentence
end-if
perform a
perform b
perform c
.
paragraph-b.

I don't care for this myself. CoBOL should be clear and should avoid
"tricks" wherever possible.

It does. That is, the Cobol standard does avoid such tricks and
specifies that the above does not comply. It is only some vendors that
allow such tricks.

I was thinking that it was forbidden per the standard. I guess I haven't been
out of the scene for that long... :)


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ / \ / ~ Live from Albuquerque, NM! ~
~ / \/ o ~ ~
~ / /\ - | ~ daniel@thebelowdomain ~
~ _____ / \ | ~ http://www.djs-consulting.com ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ GEEKCODE 3.12 GCS/IT d s-:+ a C++ L++ E--- W++ N++ o? K- w$ ~
~ !O M-- V PS+ PE++ Y? !PGP t+ 5? X+ R* tv b+ DI++ D+ G- e ~
~ h---- r+++ z++++ ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

"Who is more irrational? A man who believes in a God he doesn't see, or a man
who's offended by a God he doesn't believe in?" - Brad Stine


.



Relevant Pages

  • Re: New rc technology (was: Re: 1/2 scale pitts kills two at airshow)
    ... PCM gear doesn't interoperate, for example, and I ... some performing better than our current standard. ... Though Futaba (and probably other vendors as well) do make industrial ... R/C gear too, and some of this uses spread spectrum already. ...
    (rec.models.rc.air)
  • Re: CLRFI
    ... The scenario that you seem to be worrying about, that CLRFI will become a tyranny upon users and vendors alike, can't really happen without community support. ... argument is along the lines of: "But for the standard, ... to the market with new ideas. ... like Lisp just the way it is. ...
    (comp.lang.lisp)
  • Re: Perform Thru/Go to vs. Perform - Compile Speed
    ... Replacing a paragraph name with an ENTRY causes no ... >one wishes) to the EXIT PROGRAM at the end. ... GOBACK has been legitimized in the 2002 Standard. ...
    (comp.lang.cobol)
  • OLDNEXTSENTENCE (was: Infinite Loops and Explicit Exits
    ... "I think that you have justified the standard in making this illegal. ... you are correct that this "mistake" (and Micro Focus was not the only ... >> It makes a significant difference whether that END-IF is there. ... > PECD is correct for what his compiler usually does with NEXT SENTENCE. ...
    (comp.lang.cobol)
  • Re: A petition to J3 apropos FORTRANs future
    ... Michael Metcalf wrote: ... >> At that time the standards committee was dominated by vendors, ... > threatened to take the standard out of the hands of X3J3 and publish it ... With their sudden support, ...
    (comp.lang.fortran)