Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site ncoast.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!cwruecmp!atvax!ncoast!bsa From: bsa@ncoast.UUCP (Brandon Allbery) Newsgroups: net.lang.c Subject: Re: parens around sizeof arg Message-ID: <607@ncoast.UUCP> Date: Sat, 23-Feb-85 16:11:40 EST Article-I.D.: ncoast.607 Posted: Sat Feb 23 16:11:40 1985 Date-Received: Wed, 27-Feb-85 04:02:40 EST References: <8048@brl-tgr.ARPA> Reply-To: bsa@ncoast.UUCP (Brandon Allbery) Organization: North Coast Programming, Cleveland Lines: 28 Summary: > Article <8048@brl-tgr.ARPA>, from cottrell@nbs-vms.ARPA +---------------- | /* | > > (Hey, (guys), let's (not) put extra (parentheses (everywhere)))! | > > sizeof thing | > > sizeof(type) | > | > Strictly speaking, that is correct syntax. Still, C allows one to | > parenthesise any expression. Because "operators" like 'sizeof' and | > 'return' are made up of letters, I like to put their operands in | > parentheses. Purely visual (not even syntactic) sugar. ;-) | > | > Joe Yao hadron!jsdy@seismo.{ARPA,UUCP} | | I have to agree with Joe here. I think of sizeof as a compile-time | funxion. Thus the args. Purely style. | */ Style for you guys, necessity for others. The only time I use sizeof is in such expressions as, "sizeof(struct foo)"; and our compiler doesn't realize that "struct" gets a following name, so "sizeof struct foo" gets me a syntax error. --bsa -- Brandon Allbery, decvax!cwruecmp!ncoast!bsa, ncoast!bsa@case.csnet (etc.) 6504 Chestnut Road Independence, Ohio 44131 +1 216 524 1416 (or what have you) -=> Does the Doctor make house calls? <=-