[Gambas-user] Array question
Paolo Saudin
sdnpaolo at ...69...
Sat Oct 9 11:11:15 CEST 2004
Hi all,
I need to use a multidimensional array ( x1[0][0] , x1[0][1] , x1[1][0]
, x1[1][1] ... ) and at a certain time,
I want to copy it in a bakup array in order to work with the new one
without loose the original data.
Here's my problem : when I copy ( x2=x1.copy() ) a single dimension
array all it works as expected,
but as soon as I use a multidimensional one, the original is treated as
a "referenced" copy and get modified as well.
Attached there is an example to demonstrate it clearer :-). Is there
another way to deep copy two arrays?
Many thanks,
Paolo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-array.tar.gz
Type: application/x-tgz
Size: 897 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20041009/ef6efe45/attachment.bin>
More information about the User
mailing list