#: 4017 S3/Languages
30-May-90 23:38:12
Sb: #4014-#C and JOoysticks
Fm: Bruce MacKenzie 71725,376
To: Zack Sessions 76407,1524 (X)
Zack,
Of the three books on C in my library, Purdum always uses parentheses,
Gehani never does and Hogan says they're not required but that many use them
for clarity. There is a diversity in this usage and I would say that any
compiler that required parentheses with return is definitly non-standard. It
is a question of style and I think the most compelling argument is Occam's
Razor--why hit the shift key if you don't need to. Still I think a line like:
return (strcmp(s1,s2)==1) ? s1 : s2;
does benefit by being written
return((strcmp(s1,s2)==1) ? s1 : s2);
although the two do compile the same.
There is 1 Reply.
|