Re: newbie question on cobol syntax



On Apr 24, 3:58 am, Howard Brazee <how...@xxxxxxxxxx> wrote:
On Mon, 23 Apr 2007 15:34:58 GMT, "William M. Klein"

<wmkl...@xxxxxxxxxxxxxxxxx> wrote:
As most people (but not all) agre, "mixing" next sentence with scope delimiters
is NOT a good thing to do.

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.

Actually another 'trick' with MF is to put an OLDNEXTSENTENCE
directive in the site defaults then the above 'trick' fails to work
causing much confusion and hilarity.


.



Relevant Pages

  • Re: Sections, Paragraphs, and related topics
    ... I can't win this argument though until we get compilers with EXIT PARAGRAPH ... > code easier to understand or fix quickly. ... been sticking in a dummy Section name to avoid warning error. ... followed by a dummy REST-OF-THE-PROGRAM SECTION to avoid drop-through ...
    (comp.lang.cobol)
  • Re: Perfrom Thru
    ... > end of 1000-Exit is to allow GO TOs. ... It is trivially easy to avoid ... Therefore it is trivially easy to eliminate the ... In such instances, if the existing paragraph is directly PERFORMed, the ...
    (comp.lang.cobol)
  • Re: Color spreading across columns with parcolumns package
    ... of a paragraph as this can have unintended consequences. ... you would avoid the creation of a space after a brace with: ... Then the text and the column rules will line up nicely. ...
    (comp.text.tex)
  • Re: Paragraph text refers to more than one style
    ... sentences not the entire paragraph. ... So how can i avoid my template getting ... >> in the document (not in the template). ... >> character styles i get the following message "Paragraph text refers to ...
    (microsoft.public.word.application.errors)
  • Sections, Paragraphs, and related topics
    ... paragraph and/or exit paragraph) *OR* having all PARAGRAPHS is each an "equally ... to the '85 Standard or in the '02 Standard of doing an "immediate exit" from ... THRU - when sufficient safeguards are in effect to avoid other ... EXIT PARAGRAPH - as it avoids "potentially error-prone" labels - but accept ...
    (comp.lang.cobol)