programming language, "loops are usually special." If you need to capture the value of a loop-control variable beyond the boundaries of the loop, use a separate variable for that purpose. (Remember to initialize it to some value before the loop begins, in case the loop doesn't run at all!) It is very common for various implementation quirks to be used with regard to loops, in the very-important name of efficiency.