C
Chris Croughton
What ranges are those? Where are they specified? This statement contradicts
H&S: "The C language does not specify the range of integers that the
integral types will represent...".
Section 5.2.4.2 in the C99 spec. gives the minimum ranges that a
conforming implementation must support, in the form of the minimum
values for the macros in limits.h. The C89 spec. had something similar.
There are no upper bounds on the magnitudes representable by each type,
however (so for instance an unsigned char is at least 8 bits but could
be 9, 12, 32 or more). There is also a relationship such that:
bits(char) <= bits(short) <= bits(int) <= bits(long) <= bits(long long)
(bits(<t>) meaning the number of significant bits in type <t>) and the
same for unsigned types (e.g. you can't have a char which can't be
represented in a short or a long with fewer bits than an int, although
they could all be the same size and are for some processors).
Chris C