Re: interesting use of NEXT SENTENCE vs. CONTINUE
- From: "Richard" <riplin@xxxxxxxxxxxx>
- Date: 6 Jun 2005 14:29:34 -0700
> A full stop is just as clear and precise (once you understand what it actually
> means) as is a NEXT SENTENCE, a GO TO, or any other CoBOL construct.
As I have pointed out before: what is 'clear and precise' is entirely
what one is used to. Of course it is obvious once you have understood
it, the question then is: how does one get to understand it ?
If one understands the standard then when a full stop (followed by a
space) is seen it clearly terminates the sentence. This can be readily
understood to: make no difference at all; or end the scope of the
statement preceeding it.
The extension of having NEXT SENTENCE in an END-IF adds a completely
new context to the full stop as it now makes it possible to be the
terminal point of an implicit GO TO even though the code is at zero
scope level.
That is a context that is disallowed by the standard and will _not_ be
'understood' by those who follow the standard. Thus it is not 'clear
and precise' to _them_ regardless of how well you understand it.
> - if you don't expect your maintenance programmers to know how to use it, don't use it.
Ah, so you do agree with me ;-)
> So any CoBOL construct that isn't found in other languages should similarly be
> eschewed?
If (and you should note that I am using if) you want your programs to
be easier to understand then one way to do this is to reduce the number
of different ways that control constructs are used. It is also an
advantage if this reduction can be guaranteed by, for example, a text
scan or a comformance checker - that way any new coder can determine
easily what contexts need to be examined (and which will only require a
cursory glance).
If, for example you want your code to be understood equally well by
multi-language coders then using, as far as possible, contructs that
they may be familiar with and avoiding those they are not, will make
them less error prone and will more readily understand your intent.
.
- 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: Howard Brazee
- 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
|