Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The Meaning of Rule 12.6?
#1
I am trying to understand this rule and need someone to clarify its exact meaning.

which of the following are violations of Rule 12.6?

Code:
if((x==y)|(y==a))/*Violation?, could || have been meant?*/
   {    

   }
This is a violation of the old equivalent rule 36 but is it still a violation now?

Code:
a=a+y+x+(x||y);
/*Violation, effectively boolean expression used with + operator*/

Code:
int32_t x=5;
int32_t y=11;

if(x||y) /*Could this be a violation??? because x and y are not effectively boolean*/
   {
      
   }


Thanks for you help!
<t></t>


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)