Re: interesting use of NEXT SENTENCE vs. CONTINUE
- From: "Richard" <riplin@xxxxxxxxxxxx>
- Date: 3 Jun 2005 13:06:57 -0700
> 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.
>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.
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'. 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.
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.
.
- Follow-Ups:
- Re: interesting use of NEXT SENTENCE vs. CONTINUE
- From: docdwarf
- 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
- Re: interesting use of NEXT SENTENCE vs. CONTINUE
- From: docdwarf
- interesting use of NEXT SENTENCE vs. CONTINUE
- Prev by Date: Re: interesting use of NEXT SENTENCE vs. CONTINUE
- Next by Date: Re: interesting use of NEXT SENTENCE vs. CONTINUE
- 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
|