Re: Help! GO TO and PERFORM THRU!
- From: "Pete Dashwood" <dashwood@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 6 Mar 2007 12:24:03 +1300
"Frank Swarbrick" <Frank.Swarbrick@xxxxxxxxxxxxxx> wrote in message
Charles Hottel<chottel@xxxxxxxxxxxxx> 03/03/07 7:24 PM >>>Gosh! you mean like LX-1 and myself suggested 3 days ago in this thread?
"Pete Dashwood" <dashwood@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
"Howard Brazee" <howard@xxxxxxxxxx> wrote in message
On Thu, 1 Mar 2007 12:15:37 +1300, "Pete Dashwood"
I couldn't disagree more.
About the flag or the style mix :-)?
I like full stop periods within paragraphs - and always use END-IFs
with my IFs.
Fair enough. A personal preference.
As you may have gathered, I disagree. I think periods were a major cause
great.of error in "old" COBOL and the fewer you have of them, the better. The
only requirement now (in the Procedure Division...) seems to be
immediately preceding a paragraph/section name and I reckon that is
Why would I prefer fewer periods (full stops)...?
1. With some of the old impact printers they didn't render properly and
were easily missed. Sure, that is much less of a problem these days when
we print listings with laser printers, but I have lingering suspicions
realany program listing. Fortunately, I never use COBOL listings these days
and haven't for many years... Still, reducing the periods reduces any
or imagined risk and makes me feel better :-).
2. Using an end-of-statement terminator (full stop) (which is small and
easily missed) rather than a scope delimiter (which is easily visible
prone.logically sensible) makes cutting and pasting code much more error
3. Using both scope delimiters and full stops just seems ugly and
unnecessary to me.
I think using END-IF is a step in the right direction, but why not take
youfew more steps and use ALL of the scope delimiters? Before you know it
are thinking in logical scope blocks (just as you would in a modern
language), and periods are just an ugly irrelevance in the middle of
There are many ways to write a nested IF statement. Here is one style I
seen (with the ending left unfinished):
How would you choose to end something like this?
1. You could just put a period at the end of the last statement in the
2. You could code END-IF with a period.
3. You could code an END-IF for each IF all on one line, with or without a
period after the last one. The more IFs the more chance of getting it
and the harder it will be to read. Of course the IBM mainframe compiler
shows you a nesting level number to aid in this type of thing.
4. You could use EVALUATE instead.
There has been a whole debate sparked by this... We moved from using
EVALUATE to whether or not you should agree to perpetuate bad practice. You
really must keep up, Frank... :-)