side effect on assignment to associative array

Christian Kamm kamm at incasoftware.de
Wed Oct 11 03:53:05 PDT 2006


After the following assignment

int[int] aa;
aa[0] = aa.length;

aa[0] does contain 1. I would have expected the right hand side to be  
evaluated first, thus resulting in 0 being assigned to aa[0]. Is this  
intended behaviour or a bug?



More information about the Digitalmars-d-bugs mailing list