Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version nyu B notes v1.5 12/10/84; site csd2.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!cmcl2!csd2!schwrtze From: schwrtze@csd2.UUCP (Eric Schwartz group) Newsgroups: net.lang.c Subject: Re: (Guy) HARRIS FLAME Re: SHORT vs. INT Message-ID: <3090007@csd2.UUCP> Date: Fri, 13-Sep-85 09:59:00 EDT Article-I.D.: csd2.3090007 Posted: Fri Sep 13 09:59:00 1985 Date-Received: Sat, 14-Sep-85 17:02:47 EDT References: <687@sfmag.UUCP> Organization: New York University Lines: 23 /* csd2:net.lang.c / mjs@sfmag.UUCP (M.J.Shannon) / 9:26 am Sep 11, 1985 */ > 2. NETWORK COMMUNICATION > To enable network communication between different machines, a "short" is > guaranteed to be 16-bits and a "long" is guaranteed to be 32-bits. This > is either convention or standard, I am not sure which. The C language guarantees only that "short" is no longer than "long". There is no guarantee of any width of "short", "int", or "long" other than that! It does turn out that in most implementations, the underlying hardware gives the compiler-writer a choice of 8-, 16-, 32-, and possibly 64-bit integers, but there are notable exceptions: the Honeywell 6000 (since renamed, but I no longer recall what the new name of that architecture is), the DECsystem 10 & 20, etc. These machines don't have word sizes that are powers of 2 wide (in bits). Rather, a word is 36 bits wide, a halfword is 18, and a byte is just about any size you like (5, 6, 7, 8, 9 bits). Folks who depend on integral types having exactly some size write less portable code than folks who depend on said types having at least some size. -- Marty Shannon UUCP: ihnp4!attunix!mjs Phone: +1 (201) 522 6063 Disclaimer: I speak for no one. /* ---------- */