Re: Code problems with Perform Thru Exit causes fall through
- From: "Pete Dashwood" <dashwood@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 31 Jul 2007 10:59:38 +1200
"Howard Brazee" <howard@xxxxxxxxxx> wrote in message
news:3i3sa3hcmfal9nepkknnke9cq2eu4981c5@xxxxxxxxxx
On Sun, 29 Jul 2007 23:56:46 +1200, "Pete Dashwood"
<dashwood@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
When sections are used as mini-programs, they have
a well-defined interface, thus all changes to the
mini-program are isolated from the rest of the code.
And, such mini-programs may be easier to re-use.
The first one is something I do (did?) all the time. It is particularly
obvious when you use OO, although I hadn't thought about it in the terms
described.
But there are two alternatives to give better isolation than Sections
if that is your goal. Subprograms and objects are reasonable
alternatives.
Absolutely. As you know, I use Objects.
For myself, I was forced to move from PERFORM THRU (paragraph names) to
PERFORM [Section] when the standards in the place I was working at were
changed by a new chief programmer who liked SECTIONS. (This was around
1968). Very explicit rules were laid down about their use (no mixing
PERFORMs of paragraphs and sections in the same program, no use of THRU,
Sections being used to encapsulate specific functions, and so on. Most of
us
were not happy with the change; people usually resist what they're not
used
to, but within a few months most of us had got the "hang of it" and had no
problem with it. Since then I have always written SECTIONed code in COBOL
and it has never been a problem (for me, or for others who had to
subsequently maintain the code.)
I actually had a *requirement* (at EDS) to perform Section through
paragraph-exit.
Oh, well.
And you just cracked on and did it... Good for you :-)
Oh, did I mention I also maintained code that had ALTERs in it? Never had
a
problem with that particular construct, either, and on early platforms
where
we cared about bytes and performance, ALTER was an extremely efficient way
of implementing things like first time switches and managing overlays. I
was
sorry to see it go, but the wimps won the day... :-)
I didn't have problem with ALTERs either - I believe my programming
and maintenance took longer, but I was also a greenhorn back then. I
really can't trust my memory to compare how much more work (or less
reliability) that programming was than my current style.
You are a professional in every sense of the word, Howard, and have
demonstrated it here on many occasions. I'm not surprised you're not
troubled by these things.
I have become persuaded against GO TO over the years, but it really
doesn't
bother me if others use it. After maintaining and managing spaghetti code
for years before Mr. Djikstra wrote his paper, I was pretty blase about
it.
Which pretty much is my attitude. About life. Having a style that
works for me is all fine and good - it is Righteous people who want to
enforce their views on the rest of the world who commit most of the
evils of today.
(Funny thing that Jesus fought Righteous people, and was crucified for
His efforts).
Er... if it's a choice between being shot or crucified... I think I'll drive
a truck... :-)
Pete.
--
"I used to write COBOL...now I can do anything."
.
- Follow-Ups:
- Re: Code problems with Perform Thru Exit causes fall through
- From: Howard Brazee
- Re: Code problems with Perform Thru Exit causes fall through
- References:
- Code problems with Perform Thru Exit causes fall through
- From: Lizette Koehler
- Re: Code problems with Perform Thru Exit causes fall through
- From: Richard
- Re: Code problems with Perform Thru Exit causes fall through
- From: Doug Miller
- Re: Code problems with Perform Thru Exit causes fall through
- From: tlmfru
- Re: Code problems with Perform Thru Exit causes fall through
- From: Richard
- Re: Code problems with Perform Thru Exit causes fall through
- From: Rick Smith
- Re: Code problems with Perform Thru Exit causes fall through
- From: Richard
- Re: Code problems with Perform Thru Exit causes fall through
- From: Rick Smith
- Re: Code problems with Perform Thru Exit causes fall through
- From: Pete Dashwood
- Re: Code problems with Perform Thru Exit causes fall through
- From: Howard Brazee
- Code problems with Perform Thru Exit causes fall through
- Prev by Date: Re: Code problems with Perform Thru Exit causes fall through
- Next by Date: Re: Code problems with Perform Thru Exit causes fall through
- Previous by thread: Re: Code problems with Perform Thru Exit causes fall through
- Next by thread: Re: ALTER design (Was: Code problems with Perform Thru Exit causes fall through)
- Index(es):