parens around sizeof arg

Kevin Szabo ksbszabo at wateng.UUCP
Fri Mar 8 16:57:42 AEST 1985


In article <8985 at brl-tgr.ARPA> gwyn at brl-tgr.ARPA (Doug Gwyn <gwyn>) writes:
>I see that the parentheses do not affect lvalueness, so extra parens
>	sizeof(thing)
>do no actual harm, although they are a bit sloppy, as is
>	return(expr);
>when
>	return expr;
>would do.

Why are parentheses aroung the `expr' sloppy? I had been programming
in C for quite a while before I found out that you could leave the
Parens Out!! All (or almost all) examples in K&R show parentheses
around the expressions, and this is the example that I followed.
( When in doubt, paranthesize??? ).

				Kevin
-- 
Kevin Szabo  watmath!wateng!ksbszabo (U of Waterloo VLSI Group, Waterloo Ont.)



More information about the Comp.lang.c mailing list