Re: changing in two arrays

2011-06-26 Thread Steven Schveigoffer
simendsjo Wrote: > On 26.06.2011 13:59, %u wrote: > > hi > > I create two arrays and I want the change in one of them effects the other > > one. > > > > i try > > > > int[] array1 = [1, 2, 3, 4, 5]; > > int[] array2; > > array2 = array1; // without .dup > > > > assert(array1 == array2); > > asser

Re: changing in two arrays

2011-06-26 Thread simendsjo
On 26.06.2011 13:59, %u wrote: hi I create two arrays and I want the change in one of them effects the other one. i try int[] array1 = [1, 2, 3, 4, 5]; int[] array2; array2 = array1; // without .dup assert(array1 == array2); assert(array1 is array2); // here i am confused because 'is' mean tha

changing in two arrays

2011-06-26 Thread %u
hi I create two arrays and I want the change in one of them effects the other one. i try int[] array1 = [1, 2, 3, 4, 5]; int[] array2; array2 = array1; // without .dup assert(array1 == array2); assert(array1 is array2); // here i am confused because 'is' mean thay have the same address or what?