Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site hadron.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!rlgvax!hadron!jsdy From: jsdy@hadron.UUCP (Joseph S. D. Yao) Newsgroups: net.lang.c Subject: Re: Uses of "short" ? Message-ID: <48@hadron.UUCP> Date: Mon, 28-Oct-85 20:26:07 EST Article-I.D.: hadron.48 Posted: Mon Oct 28 20:26:07 1985 Date-Received: Wed, 30-Oct-85 07:39:24 EST References: <486@houxh.UUCP> <2600017@ccvaxa> <2883@sun.uucp> Reply-To: jsdy@hadron.UUCP (Joseph S. D. Yao) Organization: Hadron, Inc., Fairfax, VA Lines: 23 In article <2883@sun.uucp> guy@sun.uucp (Guy Harris) writes: >One can write: > int size_of_UNIX_file; >or one can write > long size_of_UNIX_file; >The former is incorrect, and the latter is correct. ... Actually, if you are trying to write portable code, NEITHER is correct. This particular problem is exactly why we have the typedef, off_t. off_t size_of_UNIX_file; is correct for portable code. However, either of the above is correct for throwaway code on machines for which each one happens to be true. The trouble is, by not developing good (read innocuous but portable) habits in throwaway code, if you suddenly decide that you are an Implementor of Portable Code, you will have a lot of trouble get used to the "new" way of writing code. -- Joe Yao hadron!jsdy@seismo.{CSS.GOV,ARPA,UUCP}