[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Swarm-Support] When did gcc get so lenient about the location of variab
From: |
Paul Johnson |
Subject: |
[Swarm-Support] When did gcc get so lenient about the location of variable declarations? |
Date: |
Thu, 10 Mar 2005 16:07:09 -0600 |
User-agent: |
Mozilla Thunderbird 0.9 (X11/20041127) |
Recently I mistakenly inserted a for loop between some variable
declarations, but the program still compiled and ran. In the old days,
I used to get a compiler warning/error saying I had used unrecognized
keywords for the variables that came after the for loop.
In an example like this, see what I mean? It didn't work way back when.
- (void)calculateCutpoints
{
int i = 0;
double previousPolicy = -99.0;
id copyOfCollection = [candidateList copy: [self getZone]];
[QSort sortObjectsIn: copyOfCollection using: M(compareIdeology:)];
for (i=0; i< [partyList getCount]; i++)
{
cutpoint[i] = 0;
cutpointParty[i] = 0;
}
i=0;
id index = [copyOfCollection begin: [self getZone]];
id anObject;
--
Paul E. Johnson email: address@hidden
Dept. of Political Science http://lark.cc.ku.edu/~pauljohn
1541 Lilac Lane, Rm 504
University of Kansas Office: (785) 864-9086
Lawrence, Kansas 66044-3177 FAX: (785) 864-5700
- [Swarm-Support] When did gcc get so lenient about the location of variable declarations?,
Paul Johnson <=