Re: Integer Promotion?
- From: Lew Pitcher <Lew.Pitcher@xxxxxxxxxxxxxxxx>
- Date: Fri, 09 Jun 2006 15:32:01 -0400
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Frederick Gotham wrote:
I set about trying to find a portable way to set the value of UCHAR_MAX. At
first, I thought the following would work:
#define UCHAR_MAX ~( (unsigned char)0 )
However, it didn't work for me.
First off, why are you trying to /set/ a value that is (or should be)
supplied to you by your C implementation? Are you just trying to
second-guess your compiler, or are you trying to change the limit that
the compiler imposes. FWIW, that manifest constant is (or should be)
defined by the compiler, and externalized for your information only.
Secondly, what do you mean by "it didn't work for me". What did you get?
What did you expect to get? How did the #define fail you?
[snip]
- --
Lew Pitcher, IT Specialist, Corporate Technology Solutions,
Enterprise Technology Solutions, TD Bank Financial Group
(Opinions expressed here are my own, not my employer's)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEicyxagVFX4UWr64RAhMXAJ9zUQiKCbqNtfmepCYpysBlVeML5ACfUsVc
/llIMf24SnZYOd3pDY2vBM8=
=6eGA
-----END PGP SIGNATURE-----
.
- References:
- Integer Promotion?
- From: Frederick Gotham
- Integer Promotion?
- Prev by Date: Re: Integer Promotion?
- Next by Date: Re: Integer Promotion?
- Previous by thread: Re: Integer Promotion?
- Next by thread: Re: Integer Promotion?
- Index(es):
Relevant Pages
|
|