Re: Is it always possible to write a COBOL program using only 1 sentence per paragraph?
- From: "Chuck Stevens" <charles.stevens@xxxxxxxxxx>
- Date: Tue, 12 Jul 2005 07:48:15 -0700
<docdwarf@xxxxxxxxx> wrote in message news:db0gd8$amg$1@xxxxxxxxxxxxxxxxxxx
> Leaving aside the persnickety labelling for statement, sentence,
> imperative, instruction, what happens at the end of a paragraph (etc)...
> would someone pass this along to The Standards Folks and ask them for what
> reason - given this level of interpretation shown by a rank neophyte -
> they think the function of NEXT SENTENCE is so difficult to grasp?
Well, I guess I'd qualify as A Standards Folk.
What the standard says NEXT SENTENCE ought to do is very clear, and as
stated above. The contexts in the standard in which NEXT SENTENCE may
appear are also clear (and limited strictly to undelimited IF and
undelimited SEARCH statements).
The two problems discussed in the '02 standard can be found on Page 833:
"It is a common belief among users that control is transferred to a position
after the scope delimiter rather than to a separator period that follows it
somewhere. In addition, it is a common source of errors, especially for
maintenance programmers who inadvertently insert a period somewhere before
the actual terminating separator period."
A third unstated issue is that use of NEXT SENTENCE outside the limited
contexts in which the standard allows is a very common implementor extension
(e.g., AT END, INVALID KEY, SIZE ERROR, etc., etc., and their corresponding
NOT phrases). That complicates its interpretation.
A fourth unstated issue is that at least one implementation has supported
the perpetuation in the user community of the misapprehension as to where
NEXT SENTENCE is supposed to transfer control. It is my understanding that
this error is in the process of being corrected, but because of the large
body of existing programs that might be dependent on this erroneous
presumption, the vendor's policy and agreements with its customers requires
a long period of stern warnings from the compiler before the change can
actually be made.
A fifth unstated issue is that *before* the introduction of scope delimiters
NEXT SENTENCE could in most cases reasonably be considered an imperative
statement on its own without impacting parsing much if at all. That
fostered its use in contexts in which the standard did not provide for it
(see issue #3 above).
As the standard says as its closing defense of the archaization of NEXT
SENTENCE, "The CONTINUE statement and scope delimiters can be used to
accomplish the same functionality and such constructs are clearer and less
prone to error."
-Chuck Stevens
.
- Follow-Ups:
- References:
- Is it always possible to write a COBOL program using only 1 sentence per paragraph?
- From: Oliver Wong
- Re: Is it always possible to write a COBOL program using only 1 sentence per paragraph?
- From: Oliver Wong
- Re: Is it always possible to write a COBOL program using only 1 sentence per paragraph?
- From: Richard
- Re: Is it always possible to write a COBOL program using only 1 sentence per paragraph?
- From: Oliver Wong
- Re: Is it always possible to write a COBOL program using only 1 sentence per paragraph?
- From: docdwarf
- Is it always possible to write a COBOL program using only 1 sentence per paragraph?
- Prev by Date: Re: Are there any Pro*Cobol experts in here?
- Next by Date: Re: About your example...
- Previous by thread: Re: Is it always possible to write a COBOL program using only 1 sentence per paragraph?
- Next by thread: Re: Is it always possible to write a COBOL program using only 1 sentence per paragraph?
- Index(es):
Relevant Pages
|