源代码
<%
Sub TestMain()
Dim A : A=5
Call TestBy(A)
Response.write "ByVal传递 :"&A&""_
&"<br>默认:6和ByRef相等"
End Sub
Sub TestBy(ByVal T)
T=T+1
End sub
call TestMain()
%>
Sub TestBy(ByVal T) 结果为 5
Sub TestBy(ByRef T) 结果为 6
Sub TestBy(T) 结果为 6
参考:http://www.100byte.com/Computer/ArticleShow.asp?ArticleID=592