A variable of a particular array type can be copied to another variable of the same array type. For example…
Integer[] iValues iMoreValues
Move iValues to iMoreValues
The above copies the variable iValues to the variable iMoreValues using a deep memberwise copy operation. Each element in turn is copied from the iValues variable to the iMoreValues. The following code would be functionally equivalent to the first example…
Integer[] iValues iMoreValues
Integer iCount iSize
Move (SizeOfArray(iValues)) to iSize
For iCount From 0 to (iSize-1)
Move iValues[iCount] to iMoreValues[iCount]
Loop
Array variable assignments of incompatible types, as well as array variable assignment to/from a non-array type, are illegal, and will result in a run-time error.
Array variables are assignment compatible only if they are of the same type and number of dimensions, and:
If the destination variable is a static array: The size of each dimension in the source and destination variable are the same.
If the destination variable is a dynamic array: The size of each dimension except the most significant dimension are the same.
Dynamic arrays adopt the size of the source array in the assignment. And jagged arrays adopt the size of each dimension of the source array in the assignment.