Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Comments are needed for Rule 6-4-2? and should be placed inside the "else" block?
#2
To make the question more clear, the main concerns we now have are:
1. Should the comments be inside the {}, just as the example in the official doc shows OR can also be outside the {}?
2. If the comments could be outside, where shall the comments be added? Are there any limitations that we shall put the comments around the `else` statement?

please help clarify whether the examples in my first post are compliant or not and also whether the following case is compliant or not:
Code:
if ( x < 0 )
{
    log_error ( 3 );
    x = 0;
}
else if ( y < 0 )
{
    x = 3;
}
else {} // No change in value of x

Many thanks!
<t></t>
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)