Re: "forward" references (was: COBOL subscript range checking
- From: "Rick Smith" <ricksmith@xxxxxxx>
- Date: Mon, 27 Aug 2007 15:39:28 -0400
"William M. Klein" <wmklein@xxxxxxxxxxxxxxxxx> wrote in message
news:CRDAi.175098$jE4.100287@xxxxxxxxxxxxxxxxxxxxxxxxx
(Karl raised the issue of whether the current definition is - or is not -Standard
implementable. He didn't seem to disagree with me on what the '02
says).I
I posted, the following question to the J4 distribution list
"
This has been a discussion in the comp.lang.cobol forum and I *think* that
remember correctly, but was wondering if anyone else either remembersanswer.
differently or can point me to better places to look for a "definitive"
Entries,
The question is about "forward" references for things like CONSTANT
TYPEDEF/TYPE, and SAME AS.the '02
It is my memory that when this was discussed (during the development of
Standard) it was INTENTIONALLY decided that a conforming program couldhave
"forward" references, e.g.in
- use of a constant-name in Special-Names paragraph - with CONSTANT entry
data divisionreferences, but
- Use of TYPE pointing to a TYPEDEF defined later in the program
- SAME AS referring to record later in the data division
It was thought (???) that the rules DO prohibit "circularity" of
that "forward" references were INTENTIONALLY allowed.can
Without submitting an interpretation request (that I MIGHT end up doing),
others tell me what they think was INTENDED and ALLOWED?"to
***
Sp far, I have received 3 replies, i.e
"** Reply 1
"My recollection is the same as Bill's."
*** Reply 2
" I wasn't there for this part of the development, but I can say that how
deal with "forward references" is an mplementation detail. From aare
compiler-design standpoint such issues are pretty much moot if two passes
made against the source or an encoded version of it. Nested programs aspoint
introduced in '85 complicates the implementation, but doesn't change the
that it's the implementor's job to resolve the references, and I believethe
rules are clear as to how to resolve them (or determine that they areambiguous
and take appropriate action).RECORD KEY
Moreover, forward references exist in the '74 standard -- SELECT ...
... being but one example.for at
My opinion is that the resolution of references -- be they forward or
backward -- is one of the things the implementor is expected to provide
compilation time, and is not something the end user is supposed to beconcerned
about so long as the references can be resolved unambiguously. "this a
*** Reply 3
""Forward" references are allowed and were intentionally allowed. Why is
problem (it is a problem for the implementors, not the users)? Nointended or
interpretation is needed since it is quite clear."
* * * * * * * * * * * *
I don't think that these will change Rick's mind (on either what was
stated), but I did think that I would share these.
These replies seem to be non-responsive to the "real"
question. I agree with what was said by both 2 and 3;
but neither addressed conformance with respect to
substitution ("as if"/"as though" ...) with elements defined
later in source text. This is particularly evident in 2 by
referring to the 74 and 85 standards when the "real"
question doesn't arise until the 2002 standard. 1's reply
contains nothing to show that the "real" question was
being addressed; rather, it does nothing more than agree
with a potentially faulty recollection.
The bottom-line is that there is nothing in these replies
to serve as reason for my changing my mind!
.
- Follow-Ups:
- Re: "forward" references (was: COBOL subscript range checking
- From: William M. Klein
- Re: "forward" references (was: COBOL subscript range checking
- References:
- COBOL subscript range checking
- From: Frank Swarbrick
- Re: COBOL subscript range checking
- From: foodman123
- Re: COBOL subscript range checking
- From: Frank Swarbrick
- Re: COBOL subscript range checking
- From: Howard Brazee
- Re: COBOL subscript range checking
- From: Frank Swarbrick
- Re: COBOL subscript range checking
- From: Roger While
- Re: COBOL subscript range checking
- From: Frank Swarbrick
- Re: COBOL subscript range checking
- From: Rick Smith
- Re: COBOL subscript range checking
- From: William M. Klein
- Re: COBOL subscript range checking
- From: Rick Smith
- Re: COBOL subscript range checking
- From: William M. Klein
- Re: COBOL subscript range checking
- From: William M. Klein
- Re: COBOL subscript range checking
- From: Rick Smith
- Re: COBOL subscript range checking
- From: William M. Klein
- Re: COBOL subscript range checking
- From: Rick Smith
- Re: COBOL subscript range checking
- From: William M. Klein
- Re: COBOL subscript range checking
- From: Rick Smith
- Re: COBOL subscript range checking
- From: William M. Klein
- Re: COBOL subscript range checking
- From: Rick Smith
- "forward" references (was: COBOL subscript range checking
- From: William M. Klein
- Re: "forward" references (was: COBOL subscript range checking
- From: Karl Kiesel
- "forward" references (was: COBOL subscript range checking
- From: William M. Klein
- COBOL subscript range checking
- Prev by Date: Re: "forward" references (was: COBOL subscript range checking
- Next by Date: Re: "forward" references (was: COBOL subscript range checking
- Previous by thread: "forward" references (was: COBOL subscript range checking
- Next by thread: Re: "forward" references (was: COBOL subscript range checking
- Index(es):
Relevant Pages
|