On May 31, 2005, at 10:45 AM, Robert Woodhead wrote:
Was playing around with some recursion today in which it would be
handy to recursive on an array. So passing the array byVal so each
instance of the method would have its own copy seemed like just the
ticket.
Except that it seems that if you declare a parameter as:
byVal a() as Integer
it actually gets passed by reference!
This is not good. It's either a bug, or if it is intended that byval
not work with arrays, then it needs to be redlined in the
documentation in 48pt font that it doesn't!
If you want to pass a copy of an array, then you need to copy the array
yourself and pass the copy without using either ByVal or ByRef.
--------------
Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|