> It is *not* undefined when the loop is left with break or exit,
> that's the point. The ISO is not a very good reference for modern-
> ish Pascal.

I think based on both documented and observed behaviour, the following 
definition would be appropriate:

The for-loop variable is undefined after the loop if the loop ran to 
completion. It retains its last value if the loop exited in a controlled way 
(goto, break, exit, ?) before running to completion.

The ISO standard basically listed all known "controlled" ways to exit the loop 
before it ran to completion. It's just that in the meantime other flow control 
methods have been added.

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to