Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Pascal Ansi -iso > Re: Loop variab...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 8 Topic 162 of 213
Post > Topic >>

Re: Loop variables in ISO 7185

by 2metre <news55@[EMAIL PROTECTED] > Jun 29, 2005 at 11:34 AM

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
>
 




 8 Posts in Topic:
Loop variables in ISO 7185
2metre <news55@[EMAIL   2005-06-28 11:33:13 
Re: Loop variables in ISO 7185
frank@[EMAIL PROTECTED]   2005-06-28 14:33:53 
Re: Loop variables in ISO 7185
akarl <fusionfive@[EMA  2005-06-28 15:15:57 
Re: Loop variables in ISO 7185
2metre <news55@[EMAIL   2005-06-28 17:22:03 
Re: Loop variables in ISO 7185
frank@[EMAIL PROTECTED]   2005-06-28 18:41:08 
Re: Loop variables in ISO 7185
2metre <news55@[EMAIL   2005-06-29 11:34:52 
Re: Loop variables in ISO 7185
frank@[EMAIL PROTECTED]   2005-06-29 14:32:18 
Re: Loop variables in ISO 7185
2metre <news55@[EMAIL   2005-06-29 15:49:41 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Jul 6 2:57:43 CDT 2008.