Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!caip!nike!ucbcad!pavepaws!chapman From: chapman@pavepaws.berkeley.edu (Brent Chapman) Newsgroups: net.micro.amiga Subject: Re: Re: Orphaned Response (K&R defn. of int size on various machines) Message-ID: <816@ucbcad.BERKELEY.EDU> Date: Tue, 8-Jul-86 13:59:21 EDT Article-I.D.: ucbcad.816 Posted: Tue Jul 8 13:59:21 1986 Date-Received: Wed, 9-Jul-86 02:36:51 EDT References: <8607040632.AA22409@pavepaws> <430@oscvax.UUCP> Sender: news@ucbcad.BERKELEY.EDU Reply-To: chapman@pavepaws.UUCP (Brent Chapman) Organization: UNIXversity of California, Berkeley Lines: 43 In article <430@oscvax.UUCP> rico@oscvax.UUCP (Rico Mariani) writes: >In article <8607040632.AA22409@pavepaws> dillon@PAVEPAWS.BERKELEY.EDU.UUCP writes: >> I Believe K & R define shorts and longs to be not less than 16 and >>32 bits respectively. >> >> -Matt > >I don't have my K&R with me right now to check but I beleive that the >above is incorrect. I think it's > > int >= 16 bits > > # of bits in a short <= # of bits in an int > # of bits in a long >= # of bits in an int > >That's all she wrote... meaning you could have a system with > ints = shorts = longs = 16 bits (yecch!) > >Like I said, I'm not sure about this. This should probably be in net.lang.c > > -Rico K&R specificly does NOT specify the "minimum size" in bits of any type (including char). What it says is (from pages 182-183): Up to three sizes of integer, declared short int, int, and long int, are available. Longer integers provide no less storage than shorter ones, but the implementation may make either short integers, or long integers, or both, equivalent to plain integers. "Plain" integers have the natural size suggested by the host machine architecture; the other sizes are provided to meet special needs. Brent -- Brent Chapman chapman@pavepaws.berkeley.edu ucbvax!pavepaws!chapman TANSTAAFL! (There Ain't No Such Thing As A Free Lunch!)