G
Guest
I see that array names are pointers and that a given array, say A[,], can be
altered within a sub when passed as an argument; whether it be by (ref
double[,] A) or by (double[,] A).
I do not clearly understand when to use (ref double[,] A) but I believe it
is when I want my sub to be able to change the identity of the array in
question (that is, change what A is pointing to). Is this correct?
More importantly for me is the question of which technique to use when I
know that I want the sub to operate on a specific array. Is there any
difference in data flow or efficiency between the two methods? Is there a
preferred SOP?
altered within a sub when passed as an argument; whether it be by (ref
double[,] A) or by (double[,] A).
I do not clearly understand when to use (ref double[,] A) but I believe it
is when I want my sub to be able to change the identity of the array in
question (that is, change what A is pointing to). Is this correct?
More importantly for me is the question of which technique to use when I
know that I want the sub to operate on a specific array. Is there any
difference in data flow or efficiency between the two methods? Is there a
preferred SOP?