Re: 7.0 wishlist?
- From: Joshua Cranmer <Pidgeot18@xxxxxxxxxxxxxxx>
- Date: Wed, 12 Nov 2008 07:50:08 -0500
Harold Yarmouth wrote:
Joshua Cranmer wrote:((array[i++] << 8) & 0xff) | (array[i++] & 0xff)
That is side effects.
That is bit-twiddling, not matrix multiplication.
It is very much the same vein. Face it: expressions can, and will, have side effects. Even if addition is commutative in mathematics, you can't assume it's true in computer science.
In fact, that is the kind of code I used to fire people for writing in C, before I decided that I preferred programming to managing programmers and went back to basics.
Well, its outcome is undefined in C since when i is incremented is unspecified.
--
Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald E. Knuth
.
- Follow-Ups:
- Re: 7.0 wishlist?
- From: Harold Yarmouth
- Re: 7.0 wishlist?
- References:
- Re: 7.0 wishlist?
- From: Harold Yarmouth
- Re: 7.0 wishlist?
- From: Joshua Cranmer
- Re: 7.0 wishlist?
- From: Harold Yarmouth
- Re: 7.0 wishlist?
- From: Joshua Cranmer
- Re: 7.0 wishlist?
- From: Harold Yarmouth
- Re: 7.0 wishlist?
- From: Joshua Cranmer
- Re: 7.0 wishlist?
- From: Harold Yarmouth
- Re: 7.0 wishlist?
- From: Joshua Cranmer
- Re: 7.0 wishlist?
- From: Harold Yarmouth
- Re: 7.0 wishlist?
- Prev by Date: Re: 7.0 wishlist?
- Next by Date: how does Ojb, JDO, EJB3-Entity Bean, JPA, OpenJPA are differ from each
- Previous by thread: Re: 7.0 wishlist?
- Next by thread: Re: 7.0 wishlist?
- Index(es):