[Univ of Cambridge] [Dept of Engineering]
next up previous contents
Next: switch Up: Selection Previous: Selection

if

...
if (i==3) // checking for equality; `!=' tests for inequality
   // no braces needed for a single statement
   j=4;
else{ 
  //  the braces are necessary if the 
  //  clause has more than one statement
   j=5;
   k=6;
}
...



Tim Love
2001-07-05