From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Wed, 1 Mar 2006 13:32:52 -0500 From: jmk@plan9.bell-labs.com To: 9fans@cse.psu.edu Subject: Re: [9fans] A Plan 9 C request.... In-Reply-To: <59a908a62c52dd9ff6252fe697d37a87@coraid.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 089cb382-ead1-11e9-9d60-3106f5b1d025 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, brantley@coraid.com 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); > }