Path: utzoo!utgpu!attcan!uunet!steinmetz!davidsen From: davidsen@steinmetz.ge.com (William E. Davidsen Jr) Newsgroups: comp.lang.c Subject: Re: Absolute size of 'short' Keywords: unsigned wrap-around Message-ID: <11703@steinmetz.ge.com> Date: 2 Aug 88 15:03:14 GMT References: <214@ISIDAPS5.UUCP> Reply-To: davidsen@crdos1.UUCP (bill davidsen) Organization: General Electric CRD, Schenectady, NY Lines: 15 In article <214@ISIDAPS5.UUCP> mike@ISIDAPS5.UUCP (Mike Maloney) writes: | Dear C-Heavies, | | Is the size of a (signed or unsigned) short integer guarenteed to | be two bytes? I need to manipulate and compare some unsigned ints | modulo 65536. It would be clean and convenient to just let the | machine handle my wrap-around from 0 to 0xffff and verse-vica. Shorts are at least two bytes, but may be longer, and bytes are at least eight bits but may be more, such as 9 on a 36 bit machine (PDP10, Honeywell), or 12 (some DEC machine with 12 bit words). -- bill davidsen (wedu@ge-crd.arpa) {uunet | philabs | seismo}!steinmetz!crdos1!davidsen "Stupidity, like virtue, is its own reward" -me