codefox
08-09-2004, 06:42 PM
It's been a while since I worked with ASP, I've forgotten some concepts. I know vb (and hence vbscript) passes arguments by reference. The following page gave me 100, I expected 1000:
<%
Dim a
a = 10
call test1(a)
Response.Write a
Sub test1(b)
b = 100
test2(b)
End Sub
Sub test2(c)
c = 1000
End Sub
%>
Why's that test2(b) did not change the value of b in test1? Is it because parameter variables are not passed by reference?
Thanks.
<%
Dim a
a = 10
call test1(a)
Response.Write a
Sub test1(b)
b = 100
test2(b)
End Sub
Sub test2(c)
c = 1000
End Sub
%>
Why's that test2(b) did not change the value of b in test1? Is it because parameter variables are not passed by reference?
Thanks.