Re: string operation??
- From: "Spiros Bousbouras" <spibou@xxxxxxxxx>
- Date: 27 Nov 2006 13:37:10 -0800
Random832 wrote:
Is CHAR_MAX allowed to be a value other than a power of two minus one?
In N1124, 6.2.6.2., paragraph 1 we read
For unsigned integer types other than
unsigned char, the bits of the object
representation shall be divided into two
groups: value bits and padding bits (there
need not be any of the latter). If there are N
value bits, each bit shall represent a different
power of 2 between 1 and 2^(N-1), so that objects
of that type shall be capable of representing values
from 0 to 2^N - 1 using a pure binary representation;
this shall be known as the value representation.
And in paragraph 2 we read
For signed integer types, the bits of the object
representation shall be divided into three groups:
value bits, padding bits, and the sign bit. There
need not be any padding bits; there shall be exactly
one sign bit. Each bit that is a value bit shall have
the same value as the same bit in the object
representation of the corresponding unsigned type
(if there are M value bits in the signed type and N in
the unsigned type, then M <= N).
of any integer type is a power of 2 minus 1.From the above I'm led to think that the maximum value
.
- Follow-Ups:
- Re: string operation??
- From: Random832
- Re: string operation??
- References:
- string operation??
- From: sethukr@xxxxxxxxx
- Re: string operation??
- From: mark_bluemel
- Re: string operation??
- From: Christopher Benson-Manica
- Re: string operation??
- From: Random832
- string operation??
- Prev by Date: Re: string operation??
- Next by Date: Re: screen clearing in ANSI C
- Previous by thread: Re: string operation??
- Next by thread: Re: string operation??
- Index(es):
Relevant Pages
|
|