Author: Miguel A. Ballicora
Date: 08:31:36 01/08/03
Go up one level in this thread
On January 08, 2003 at 11:15:27, Dieter Buerssner wrote: >On January 07, 2003 at 20:16:05, Matt Taylor wrote: > >>If you read the C standard carefully, the size of short, int, and long were not >>defined when Kernighan and Ritchie worked on it. The int datatype is meant to be >>the optimal machine datatype, not necessarily 32-bits or whatever. > >Unfortunately, my copy of K+R was stolen long time ago from my desk, so I cannot >check it anymore. I believe to remember, that the minimum ranges for the integer >type were already defined there. This has not changed until today. The ISO C99 from memory, K&RII is at home: char --> 8 bits or bigger short --> not smaller than char int --> bigger or equal than short && bigger or equal than 16 bits long int --> bigger or equal than int && bigger or equal than 32 bits I do not remember now whether a short can be smaller than 16 bits. Miguel >Standard still defines the integer types by the minimum ranges (and some more >restrictions for unsigned types). In C99 there is also a type, that has >(practically speaking) at least 64 bits ([unsigned] long long). > >When I first met the Alpha (I think almost 10 years ago), the DEC C compiler >already supported 64 bit longs (one could switch between 64 bit and 32 bit longs >by a compiler switch, similar for pointers - at least IIRC). At that time Gcc >already had the long long type. > >Regards, >Dieter
This page took 0.02 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.