Multiple assignment

Ali Çehreli acehreli at yahoo.com
Fri Feb 25 17:31:36 PST 2011


On 02/25/2011 05:09 PM, bearophile wrote:

 >      int j;
 >      int[2] y;
 >      y[j] = j = 1;

I think that's undefined behavior in C and C++. It is not defined 
whether j's previous or past value is used in y[j].

I would expect the situation be the same in D.

Ali



More information about the Digitalmars-d-learn mailing list