02-20-2012, 09:24 PM
Code:
DIM grid (4) as uByte => {0,1,2,3,4}
gridcopy=grid
Hmm.
Okay. If I dim gridcopy first, that bit works - but
1> It fails to copy the data. the first print out of gridcopy still shows 0,0,0,0
2> It fails to compile at the second copy, when I try to reinitialise it again: 40: Array 'grid' has 1 dimensions, not 0
Code:
DIM grid (4) as uByte => {0,1,2,3,4}
DIM gridcopy(4) as uByte
gridcopy=grid
ink 1
for n=0 to 4
print grid (n);" ";
next n
print
print
ink 2
for n=0 to 4
print gridcopy (n);" ";
next n
print
print
gridcopy(0)=10
gridcopy(1)=20
gridcopy(2)=30
gridcopy(3)=40
ink 1
for n=0 to 4
print grid (n);" ";
next n
print
print
ink 2
for n=0 to 4
print gridcopy (n);" ";
next n
gridcopy=grid
print
print
ink 1
for n=0 to 4
print grid (n);" ";
next n
print
print
ink 2
for n=0 to 4
print gridcopy (n);" ";
next n