13-04-2021, 02:57 AM
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:
Many thanks!
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>