frank@[EMAIL PROTECTED]
wrote:
> Code snippets never conform to a Pascal standard.
Thats an interesting viewpoint. ISO 7185 includes many code snippets.
They are normally termed 'examples'. They are used to illustate a point.
As far as I'm concerned, if it's okay for the standard, it's okay for me.
> all too often users send incomplete code omitting some relevant
> information.
I think my snippet included all the neccessary information to illustate
my point for discussion.
> I've gotten tired of this. If one expects free help,
Free help? Its a discussion point. This is the place to discuss ISO
Pascal conformance isn't it?
> one could at least bother to make a self-contained test case. BTW,
> given a complete program I could just it run through GPC in ISO 7185
> mode, and it will (most likely) tell me if it conforms.
That's presuming GPC has correctly interpreted the standard. You do. I
don't. (But nor do I suggest that it doesn't).
>>Is it? The variable i is declared within the scope of the block. Or
>>isn't it? Which is the point of my original question.
>
> ISO requires a so called entire-variable for the loop counter. This
> makes it easiest to guarantee correct for-loop semantics and to
> produce efficient code.
I have now read the standard more carefully on this point and so now
know the answer.
For the sake of completeness, I think I should point out that your
answer appears incomplete.
The standard states:
"The control-variable shall be an entire-variable whose identifier is
declared in the variable-declaration part of the block
closest-containing the for-statement."
Let me stress: not *any* entire-variable but one that matches the
following qualification: "whose identifier is declared in the
variable-declaration part of the block closest-containing the
for-statement."
> See the current thread "Current test version
> of Chess 0.5" in c.l.p.misc where the same issue came up and other
> people have provided comments as well.
If someone discusses ISO 7185 in alt.s*x.bondage should I refrain from
discussing it here as well?
If you are discourteous in your replies ("I've gotten tired of this. If
one expects", "one could at least bother" etc) you'd better be very
precise and accurate in what you say and don't be upset if you get
sarcasm and a lack of courtesy in my response.
Mike
PS I do, however, applaud your work for GPC!
>
> Frank
>


|