Copy Array Strangeness
jabramson
Posts: 106
I have 2 arrays, array1[16][3] & array2[16][3]
I'd like to copy array 1 to 2 which I used
If I do
Any idea why one works and not the other. I would assume I could do a straight copy of an array as in the first example.
I'd like to copy array 1 to 2 which I used
array2 = array1But this does not work.
If I do
for (i=1; i<=16; i++) { array2[i] = array1[i] }works.
Any idea why one works and not the other. I would assume I could do a straight copy of an array as in the first example.
0
Comments
Andy
I've only made copies of structs for legibility purposes, so I'm curious.
Here on a back button I use a stack_var which initializes all elements to 0 or '' to clear a level of a structure before taking the step back: Likewise you can copy one level to another or copy zone data to another.
Here I create a stack_var of a structure to load parsed data. Once I successfully complete the parsing I transfer the stack to the global structure:
So you can basically copy the entire structure or just certain segments of the structure as needed as long as the structures or segement of the structures have the same architecture.