Re: operating with binary
- From: CBFalconer <cbfalconer@xxxxxxxxx>
- Date: Fri, 08 Sep 2006 11:51:09 -0400
Frederick Gotham wrote:
Dave Thompson posted:.... snip ...
You wanted 1U << (CHAR_BIT - 1).
unsigned to_and_with = 1U << CHAR_BIT - 1;
Kindly consult an operator precedence table.
No, Dave is right. The parentheses, whether or not necessary in C,
greatly improve the readability. Whenever the order
"multiplicative, additive, logical" does not suffice parentheses
are in order.
--
Some informative links:
news:news.announce.newusers
http://www.geocities.com/nnqweb/
http://www.catb.org/~esr/faqs/smart-questions.html
http://www.caliburn.nl/topposting.html
http://www.netmeister.org/news/learn2quote.html
.
- Follow-Ups:
- Re: operating with binary
- From: Frederick Gotham
- Re: operating with binary
- References:
- Re: operating with binary
- From: Dave Thompson
- Re: operating with binary
- From: Frederick Gotham
- Re: operating with binary
- Prev by Date: Re: scanf problem
- Next by Date: Re: [OT] Re: switch { } - case for range
- Previous by thread: Re: operating with binary
- Next by thread: Re: operating with binary
- Index(es):
Relevant Pages
|