[DGD] arrays returned from fuctions

Felix A. Croes felix at dworkin.nl
Wed Oct 10 14:07:21 CEST 2001


pete at ana.sk wrote:

> It looks like arrays returned from functions are returned by 
> reference, when i modify returned value it modifies original array 
> too. Is that expected behaviour or a bug? And if its ok, how to 
> return a copy of array?

It's intended, and you can make a copy by using an unbounded range
operator:

    arr[..]

Regards,
Dworkin
_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list