View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Function return by reference

in Bob's example, ary and myary are the same memory space - there is no
duplication. If the array was duplicated, then you would get

1 2 3 1 2 3

rather than

1 2 3 4 5 6

--
Regards,
Tom Ogilvy



"R Avery" wrote in message
...
Sorry if i was not more clear. I wish the function to actually RETURN
the reference, not just set an argument that is passed in as reference.
I want to be able to do things like myClass.myData(1,2) = 3.14..... if
possible, that is. I don't want to have to declare a separate array,
set that array equal to the array in the class, and then set individual
items in the array.

Of course, if this is not possible, then I'll have to turn to solutions
like the one you presented.