[DGD] arrays
    Felix A. Croes 
    felix at dworkin.nl
       
    Wed Oct 10 14:12:41 CEST 2001
    
    
  
pete at ana.sk wrote:
> mixed *test()
> {
>     mixed *a, *b;
>
>     a = ({ 1,2 });
>     b = a;
>     b[0] = 3;
>     return a;
> }
>
> and the result is ({ 3, 2 }). is this ok?!
Once again, yes.  Arrays are shared.  Use
    b = a[..];
if you want a copy.
Regards,
Dworkin
_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd
    
    
More information about the DGD
mailing list