I
Iams
Forgive my newbie question, but I guess I don't understand passing
parameters, in my case an array.
I have a procedure which calls another procedure, passing an array. The new
procedure creates the array, but when it returns to the original procedure,
the array is lost, along with all the parameters I want modified by the
called procedure. I thought I understood the default was byref, which would
modify the actual variable, not just a copy. I haven't had this problem
before. How should I do this?
Dim arrClients as ArrayList
Private Sub DoStuff()
'do other stuff
Call CreateClientArray(arrClients, i, v, q)
End Sub
Public Class OtherStuff
Public Sub CreateClientArray(arrClients, i, v, q)
arrClients.Add("Client1")
arrClients.Add("Client2")
i = 1
v = "stuff"
q = "quarter"
end sub
parameters, in my case an array.
I have a procedure which calls another procedure, passing an array. The new
procedure creates the array, but when it returns to the original procedure,
the array is lost, along with all the parameters I want modified by the
called procedure. I thought I understood the default was byref, which would
modify the actual variable, not just a copy. I haven't had this problem
before. How should I do this?
Dim arrClients as ArrayList
Private Sub DoStuff()
'do other stuff
Call CreateClientArray(arrClients, i, v, q)
End Sub
Public Class OtherStuff
Public Sub CreateClientArray(arrClients, i, v, q)
arrClients.Add("Client1")
arrClients.Add("Client2")
i = 1
v = "stuff"
q = "quarter"
end sub