Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!uunet!island!grenada!christmas!rtm From: rtm@christmas.UUCP (Richard Minner) Newsgroups: comp.lang.c Subject: Re: int32 et al. (was: Style guides and portability) Message-ID: <26@christmas.UUCP> Date: 15 Jan 91 04:57:36 GMT Reply-To: rtm@island.COM (Richard Minner) Distribution: comp Organization: Island Graphics, Sacramento, California Lines: 26 References: I've gathered from this discussion (and others) that it is unlikely that long will ever be implemented to be larger than int, unless int is less than 32-bits (in a `quality' implementation?). Is this so? If it is, then just using long when you need at least 32 bits should present no problems. If it is not so, then using long could possibly be `wasteful' (of space and time) if your code lived long enough to be ported to, say, an environment with 32-bit ints and 64-bit longs. As I said, I'm not too concerned, but could someone confirm my suspicions? Based on the above assumption about longs, I more or less go by the following: Requirements: Use: 1 <= bits <= 8, save space char 9 <= bits <= 16, save space short 1 <= bits <= 16, save time int 17 <= bits <= 32 long and then maybe (not ANSI-C) 33 <= bits <= 64 long long? Is that reasonable? -- Richard Minner rtm@island.COM {uunet,sun,well}!island!rtm Island Graphics Corporation Sacramento, CA (916) 736-1323