D - about array's concatenation
- yaneurao (14/17) Feb 06 2004 I think it is a very good policy.
The manual says about array's concatenation :Concatenation always creates a copy of its operands, even if one of the operands is a 0 length array, so: a = b a refers to b a = b ~ c[0..0] a refers to a copy of bI think it is a very good policy. whereas in the following program , I assume it should be 2. is it a bug? --------------------------------------- int[] a,b,c; a = new int[3]; b = new int[3]; a[1] = 2; c = a ~ b[0..0]; a[1] = 4; printf("%d",c[1]); // result : output 4. --------------------------------------- yaneurao.
Feb 06 2004