[DGD] arrays again
pete at ana.sk
pete at ana.sk
Wed Oct 10 14:49:02 CEST 2001
mixed test()
{
mixed a, b;
a = ({ ({ 1 }) , ({ 2 }) });
b = a[..];
b[0][0] = 3;
return a;
}
result is ({ {( 3 }) , ({ 2 }) })
you cant mean this seriously! if i want to copy array i shoud make
recursive cycle and use [..] on each subarray?! i better change dgd
code to use copy-on-write, or unshare arrays completely then this!
_________________________________________________________________
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list