"Stringer" <[EMAIL PROTECTED]> wrote in message news:87656@palm-dev-forum... > Nope. The only size requirement is sizeof(short) <= sizeof(long) > There's no set size for 'short', 'int' or 'long' > > And there's no gaurentee of sizeof(short) <= sizeof(int) > or of sizeof(int) <= sizeof(long)
Yes there is. In ANSI C, shorts and ints >= 16 bits, longs >= 32 bits, and that short <= int <= long. [K&R, The C Programming Language, 2.2] I think that Int16 types are guaranteed to be 16 bits. Just because the C standard does not specify sizes for primitive types doesn't invalidate this. By the same reasoning, the values in limits.h aren't guaranteed to be correct either, but you shouldn't be using the same values across multiple architectures. For a *given* architecture, you do know what the sizes of the primitive types are and can make the appropriate typedefs. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
