28-10-2014, 06:57 AM
I have a question about Rule2.1.
Are these samples correct?
The else statement is null statement or not.
sample_1
if ( a= 5 ) {
y=3;
}else{
y=0; /* not compliant */
}
sample_2
if ( a= 5 ) {
y=3;
}else{
; /* compliant */
}
I think if the else statement is null statement the code is reachable.
Is is correct?
And how about is default label?
In case all case is coded,if default label has null statement , the code is reachable.
Is it correct?
Please teach me.
Regards
Are these samples correct?
The else statement is null statement or not.
sample_1
if ( a= 5 ) {
y=3;
}else{
y=0; /* not compliant */
}
sample_2
if ( a= 5 ) {
y=3;
}else{
; /* compliant */
}
I think if the else statement is null statement the code is reachable.
Is is correct?
And how about is default label?
In case all case is coded,if default label has null statement , the code is reachable.
Is it correct?
Please teach me.
Regards
<t></t>