[openbeos] Re: Open-beos-cvs digest, Vol 1 #1587 - 8 msgs

>Hi,
>
>Bill Hayden just did the following to Shape.cpp:
>
>> Log Message:
>> Conform to new scoping rules for variables defined in a for loop
>>      status_t err = BArchivable::Archive(archive, deep);
>> +    int32 i;
>> @@ -186,7 +187,7 @@
>> -    for (int32 i = 1; i < data->ptCount; i++)
>> +    for (i = 1; i < data->ptCount; i++)
>>              archive->AddPoint("pts", data->ptList[i]);
>
>Have I missed the evolution? What new scoping rules? Did M$ win? I 
>always hated VC++ for that...

The "new" scoping rules say that a variable declared in a looping structure
(be it while, for, whatever) are only in scope within the context of that 
looping structure; after that they are undeclared.
They aren't that new, but our gcc is that old. ;-)



Other related posts: