But it should make you wonder why this is no longer allowed in the
latest C++ standards.
What do you mean?
The current C++ standard (ISO 1998+TR1) permits short scope
declarations. Indeed, C++ permits declarations to appear anywhere, not
just after a { to open a function or compound statement. It has done
since the A.R.M. days, and in some implementations before that.
You are correct. Been a while since I programmed in C++. The new
standard enforces that the short scope variable declared in a for loop
goes out of scope at the end of the loop. Older implementations did not
always enforce this. My bad.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal