From: Ulrich Eckhardt on
Vincent Fatica wrote:
> y = a*x[n] + b*x[n+1] + c*x[n+2];
>
> y = a*x[n] + b*x[n+=1] + c*x[n+=1];
>
> y = a*x[n++] + b*x[n++] + c*x[n];

For the record, and since nobody mentioned it: The order in which
expressions are evaluated is only governed by their dependencies, so for
example

f(g(), h());

might call g() first or h() first! This is just another point where your
code is not reliable.

Uli

--
C++ FAQ: http://parashift.com/c++-faq-lite

Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
First  |  Prev  | 
Pages: 1 2
Prev: "PORTING C" > 2 dim arrays?
Next: Why does this crash?