I have an 'if else' statement block like this:
if( inputArg != VALID_VALUE )
{
return error ;
}
else
{
// Do some major operation
return success ;
}
I am thinking of changing it to something like this:
if( inputArg != VALID_VALUE )
{
return error ;
}
// Do some major operation
return success ;
Which style do you recommend? Why?
if( inputArg != VALID_VALUE )
{
return error ;
}
else
{
// Do some major operation
return success ;
}
I am thinking of changing it to something like this:
if( inputArg != VALID_VALUE )
{
return error ;
}
// Do some major operation
return success ;
Which style do you recommend? Why?
Comment