Just checking some things about arrays...
aaa = arrdimension(10,10)
bbb = aaa
In this example, bbb is a pointer to the aaa array, right? it's really the same array storage, just with an alternate variable name.
whereas
ccc = arrayslice(aaa,0,-1,0,-1)
Here ccc becomes a distinct copy of aaa, and can be independently modified, correct?
those colors came out freaky, here that is again in plain text:
Just checking some things about arrays...
aaa = arrdimension(10,10)
bbb = aaa
In this example, bbb is a pointer to the aaa array, right? it's really the same array storage, just with an alternate variable name.
whereas
ccc = arrayslice(aaa,0,-1,0,-1)
Here ccc becomes a distinct copy of aaa, and can be independently modified, correct?
You are correct. Arrays and COM/.Net objects are the only WIL variables that are not deep copied on assignment. WIL uses reference counting for arrays and objects*. The ArraySlice function creates a new array, but uses WIL assignment rules for each element of the new array copied from the old array.
* Object assignment gets a little more complicated. In many cases, WIL allocates new memory to hold the object, but the underlying system object is reference counted.
I know. The above is about as clear as the coffee I am drinking as I type this.