SUB及FUCTION
哪位大虾有SUB和FUCTION方面的文章啊我不怎么理解这两个过程到底起什么作用?
具体怎么使用?
哪位高手给我指点一下
在线等
哪位大虾有SUB和FUCTION方面的文章啊
2005-11-06 11:24
", 1) MsgBox "温度为 " & Celsius(temp) & " 摄氏度。"End Sub Function Celsius(fDegrees) Celsius = (fDegrees - 32) * 5 / 9End Function
SUB后面的ConvertTemp是什么东西?Function后面的Celsius(fDegrees)是什么东西?起什么作用?他们之间是怎么传递数据值的?请指教
2005-11-06 11:46
这是定义的名称吧,
可用CALL调用,直接打上名称好像也可以
http://www.cadcnc.com/bbs/address/resave.asp
代码如下:
<%act=request.querystring("act")
if act="sub" then
call ConvertTemp()
ELSE
if act ="function" then
Celsius(fDegrees)
ELSE
response.write"<a href='resave.asp?act=sub'>sub</a><br>"
response.write"<a href='resave.asp?act=function'>function</a>"
end if
end if
Sub ConvertTemp()
response.write"<B>执行SUB过程</B>"
End Sub
Function Celsius(fDegrees)
response.write"<B>执行FUNCTION</B>"
End Function
%>

2005-11-06 16:34
2005-11-06 21:01
2005-11-06 21:25

2005-11-06 22:07
2005-11-06 22:08
2005-11-06 22:13
", 1) MsgBox "温度为 " & Celsius(temp) & " 摄氏度。"End Sub
Function Celsius(fDegrees) Celsius = (fDegrees - 32) * 5 / 9End Function
SUB后面的ConvertTemp是过程名,Function后面的Celsius是函数名,fDegrees是参数,那他们起了什么作用?他们之间是怎么传递数据值的?请指教
2005-11-06 22:17
2005-11-06 22:21