Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: C++ compilers

Author: Koundinya Veluri

Date: 10:19:27 08/18/01

Go up one level in this thread


On August 18, 2001 at 08:10:18, David Rasmussen wrote:

>Compliancewise, MSVC++ is the worst. you can't even do
>
>for (int i = 0; blahblah)
>{
>	...
>}
>
>for (int i = 0; blehbleh)
>{
>	...
>}
>
>because the scope of the i variable is from it's declaration and to the end of
>the next outer scope, instead of only in the scope of the for loop, as the
>standard says. It sucks in that regard.
>

I thought anything declared in the for statement is considered part of the for
block. Something like this:

....

for(int i = 0; blah; blahblah)
{
    ...
}

.....

is same as:

....

{
    int i = 0;
    while(blah)
    {
        ...
    }
    blahblah;
}

.....

Anyway, that's what I thought.

Koundinya



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.