The C Rationale (6.8.5.3) says:
int i = 42;
for (int i = 5, j = 15; i < 10; i++, j--)
printf("Loop %d %d\n",, i, j);
printf("I = %d\n", i); // there is no j in scope
will output
Loop 5 15
Loop 6 14
Loop 7 13
Loop 8 12
Loop 9 11
I = 42
On Wed Mar 1 13:26:33 EST 2006, [EMAIL PROTECTED] wrote:
> > now means
> >
> > { int i; for(i=0; i<10; i++); }
>
> Does that mean the following will compile?
>
> void
> f(void)
> {
> i = 3;
> put(i);
> for (int i = 0; i < 3; i++)
> put(i);
> if (i == 4) put(4);
> }
