Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/3/84; site talcott.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!tmb From: tmb@talcott.UUCP (Thomas M. Breuel) Newsgroups: net.lang.c Subject: Re: Re: parens around sizeof arg Message-ID: <290@talcott.UUCP> Date: Mon, 25-Feb-85 14:22:54 EST Article-I.D.: talcott.290 Posted: Mon Feb 25 14:22:54 1985 Date-Received: Wed, 27-Feb-85 21:12:02 EST References: <8048@brl-tgr.ARPA> <607@ncoast.UUCP> <512@rlgvax.UUCP> <314@gumby.UUCP> Organization: Harvard University Lines: 13 > > That's a "sizeof(type)", not a "sizeof thing", and the parentheses are > > necessary in that case. > > Oh, how nice. Something else for experts in C to know so they can feel > superior to the novices. Never have one, consistent way to use a language > construct when you can have two to demonstrate your mastery of the arcana. Well, you can think about 'sizeof' this way: it only allows you to take the size of an object. To get the size of a type, you have to cast an object to that type. As a notational convenience, the 'C' compiler allows you to leave out the object that you are casting... Thomas.