Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site gumby.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!seismo!uwvax!gumby!g-frank From: g-frank@gumby.UUCP Newsgroups: net.lang.c Subject: Re: Re: parens around sizeof arg Message-ID: <317@gumby.UUCP> Date: Wed, 27-Feb-85 00:52:32 EST Article-I.D.: gumby.317 Posted: Wed Feb 27 00:52:32 1985 Date-Received: Fri, 1-Mar-85 06:50:24 EST References: <8048@brl-tgr.ARPA> <607@ncoast.UUCP> <512@rlgvax.UUCP> <314@gumby.UUCP> <290@talcott.UUCP> Organization: U of Wisconsin CS Dept Lines: 23 > > > 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... > I rest my case. -- Dan Frank Q: What's the difference between an Apple MacIntosh and an Etch-A-Sketch? A: You don't have to shake the Mac to clear the screen.