On Wed, 3 Jun 1998 18:54:27 +0200 (MEST), Peter Gerwinski wrote:
According to Miklos Cserzo:
After the execution of the loop the value of the control variable is undefined.
While this is stated in ISO-10206 I have seen some ISO-7185 test programs that require the value to be <final_value>. Somebody knows definitly?
ISO 7185:6.8.3.9 says that it should be undefined, unless the loop is exited via a goto. (This same discussion came up recently on c.l.p.ansi-iso, so I'm fairly sure of this... don't have the standard in front of me right as I write this :) )
A proper code should not relay on that value.
I agree with this, so I'm interested to hear about the test programs you have that rely on post loop values of the control variable. Perhaps this is something that wasn't enforced in early Pascal implementations and later was codified in the standard.
(You see: The "Standards" section is taking over ... ;-)
(You also see why I am so slow in writing documentation. ;-)-:
I think this might be the best benefit of the current process of having everyone post their entries to the list. Partially so others can comment on other standards that the author of each section might not be familiar with, and partially so the developers can comment on any extra GPC-specific features that might also be available.
-Kevin
-- Kevin A. Foss -- kfoss@mint.net