side effect on assignment to associative array
jtd514 at nospam.ameritech.net
Wed Oct 11 13:01:50 PDT 2006
Walter Bright wrote:
> Christian Kamm wrote:
>> After the following assignment
>> int[int] aa;
>> aa = aa.length;
>> aa does contain 1. I would have expected the right hand side to be
>> evaluated first, thus resulting in 0 being assigned to aa. Is this
>> intended behaviour or a bug?
> The language doesn't guarantee order of evaluation within an expression.
Indeed, and it can drive you crazy in a debugger :)
More information about the Digitalmars-d-bugs