J
jraul
I have some code like:
if( flagIsTrue )
if( foo() )
return false;
else
if( bar() )
return false;
However, in the debugger, when the first "if" is false, it completely
skips the else. I thought this would be equivalent to:
if( flagIsTrue )
{
if( foo() )
return false;
}
else
{
if( bar() )
return false;
}
but it is not because this latter style works correctly.
if( flagIsTrue )
if( foo() )
return false;
else
if( bar() )
return false;
However, in the debugger, when the first "if" is false, it completely
skips the else. I thought this would be equivalent to:
if( flagIsTrue )
{
if( foo() )
return false;
}
else
{
if( bar() )
return false;
}
but it is not because this latter style works correctly.