Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!seismo!nbires!vianet!devine From: devine@vianet.UUCP Newsgroups: comp.lang.c Subject: Re: Standard int sizes Message-ID: <174@vianet.UUCP> Date: Wed, 15-Apr-87 19:31:51 EST Article-I.D.: vianet.174 Posted: Wed Apr 15 19:31:51 1987 Date-Received: Fri, 17-Apr-87 23:51:27 EST References: <6759@brl-adm.ARPA> <230@ems.UUCP> <170@vianet.UUCP> <3286@pogo.TEK.COM> Distribution: na Organization: Western Digital, Boulder Tech Ctr Lines: 15 Keywords: int, short Summary: not just 'short' In article <5744@brl-smoke.ARPA> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes: >If you simply need at least 16 bits in a signed integer data type, >use "short". That way whoever reads the code doesn't have to learn >what your invention "int16" means. That may work (though others have replied that 'short' is not even guarenteed to be 16 bits) if I want "at least 16 bits". I suggested the use of "int16" for those cases where a programmer wants exactly 16 bits. A similar situation exists for 32 bits. Someone could easily create an 'int32' type by selecting either an int or a long if they wanted a type that they could use portably across different compile environments. [Of course, this attempt at portability won't work if a machine's architecture is incapable of supplying 16- and 32-bit entities.]