"Larry Bates" <lbates at swamisoft.com> writes: > Actually the result is exactly as expected. Programming 101 teaches > us not to reuse loop variables in nested loops. Programming 101 usually doesn't say whether a nested loop introduces a new scope or not. If there's a new scope, it's not re-use of a variable.