← Back to team overview

cuneiform team mailing list archive

Re: Patch to build in MSVC++ 6 and pack mode in cuneiform-cli

 

On Tue, Jan 13, 2009 at 4:37 PM, Yury V. Zaytsev <yury@xxxxxxxxxx> wrote:

>> However adding extra braces is very, very ugly. If we want to support
>> MSVC 6 the way to go is to move "int i" upwards so that both loops use
>> the same i.
>
> for (int i = 0; i < foo; i++) {
>    do_something();
> }
>
> doesn't look all that bad for me.

No it doesn't. But the patch had this:

{for(int i=0; i<foo; i++) do_something();}
{for(int i=0; i<foo; i++) do_something_else();}

Rather than

int i;
for(i=0; i<foo; i++) do_something();
for(i=0; i<foo; i++) do_something_else();


And the same for larger loops.



Follow ups

References