Re: interesting use of NEXT SENTENCE vs. CONTINUE
- From: docdwarf@xxxxxxxxx
- Date: 3 Jun 2005 18:22:20 -0400
In article <1117828199.855793.254140@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Richard <riplin@xxxxxxxxxxxx> wrote:
>> When you are looking at a paragraph there is no indication that the label
>> is the target of fall-through code, a PERFORM, a GO TO or a GO TO
>> DEPENDING ON;
>
>When looking at a paragraph label one can be sure that it _is_ the
>target of one of: fall-through, goto, or perform, or else it is
>unreachable code.
>
>The actuality of the label triggers the need to determine which of
>these potential constructs are actual paths.
Midsentence interruption does not, in my experience, promote clarity...
but be that as it may the existence of a period/full stop appears to have
the same actuality; either one gets to it by previous execution or one
gets around it by a NEXT SENTENCE.
>
>>but I,
>> personally, believe that code is to be read in context; I would say that
>> trying to fix code that is not read in context is more of a bug-trap than
>> any NEXT SENTENCE construction with which I am familiar...
>
>Exactly, but the next programmer to work on this must either examine
>the code using every possible context that can be constructed using
>Cobol or will do so using a subset of contexts that: he is familar
>with; are the site standard; he has seen before.
All human beings I have met are limited by their experiences, yes.
>
>If someone is not familiar with the abuse that may be done to a NEXT
>SENTENCE in the way shown then it will not be in his list of 'contexts
>I need to look for'.
I do not understand what you are calling 'abuse'; a NEXT SENTENCE, in my
experience, does what the Standards say it should do and what every
textbook I have ever read say it should do.
>OTOH if he is to examine every possible context
>then each full stop will require a scan for a next sentence above, and
>every GOTO will require a scan for an alter.
Perhaps my education was different but I was taught that this is part and
parcel of writing and maintaining code; from the very first compile I was
taught 'allow for the possibility of the mistake being in the line before
the one that says it is giving trouble.' Have things changed so very
much?
>
>In a similar way the elimination of GO TO and THRU is a mechanism to
>reduce the number of contexts so that the program can be more easily
>understood in smaller pieces.
In an earlier sentence I stated ' When you are looking at a paragraph
there is no indication that the label is the target of fall-through code,
a PERFORM, a GO TO or a GO TO DEPENDING ON; zealous advocating of these
constructs has been called a source for 'religious wars'... but without
any indication of editing you saw fit to snip out the clause following the
semicolon.
My apologies, once again, if I have trodden unknowingly on your faith.
DD
.
- Follow-Ups:
- Re: interesting use of NEXT SENTENCE vs. CONTINUE
- From: Howard Brazee
- Re: interesting use of NEXT SENTENCE vs. CONTINUE
- From: Richard
- Re: interesting use of NEXT SENTENCE vs. CONTINUE
- References:
- interesting use of NEXT SENTENCE vs. CONTINUE
- From: Frank Swarbrick
- Re: interesting use of NEXT SENTENCE vs. CONTINUE
- From: Richard
- Re: interesting use of NEXT SENTENCE vs. CONTINUE
- From: docdwarf
- Re: interesting use of NEXT SENTENCE vs. CONTINUE
- From: Richard
- interesting use of NEXT SENTENCE vs. CONTINUE
- Prev by Date: Re: interesting use of NEXT SENTENCE vs. CONTINUE
- Next by Date: OT - So it's Friday <G>
- Previous by thread: Re: interesting use of NEXT SENTENCE vs. CONTINUE
- Next by thread: Re: interesting use of NEXT SENTENCE vs. CONTINUE
- Index(es):
Relevant Pages
|