Non-obvious name bindings

Rainer Deyke root at rainerdeyke.com
Wed Nov 14 22:26:23 EST 2001


"Ken Seehof" <kseehof at neuralintegrator.com> wrote in message
news:mailman.1005788512.24883.python-list at python.org...
> Actually, the index has the scope that contains the 'for' statement, so
> it does persist after the loop.
>
> int main(int argc, char* argv[])
> {
>     for (int i=0; i<10; i++)
>     {
>         printf("%d ", i);
>     }
>     printf("\n\n i = %d", i);
> }

This will not compile on a conforming C++ compiler.


--
Rainer Deyke (root at rainerdeyke.com)
Shareware computer games           -           http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor





More information about the Python-list mailing list