asp关于call的问题

来源:百度知道 编辑:UC知道 时间:2024/05/11 19:46:04
请教一下一个过程和一个函数的调用

sub aaa()
…………
end sub

fuction aaa()
…………
end fuction

为什么调用函数用<%call aaa()%>却得不到值?
调用函数用<%response.write aaa()%>能得到值?

为什么调用过程用<%call aaa()%>能得到值?
调用过程用<%response.write aaa()%>却得不到值?
sleepzz大哥的意思我明白,函数肯定有返回值的语句,请大哥仔细看一下我的问题.我的遇到的问题和理论上的相反.

怎么没有明白我的意思啊?

sub aaa()
…………
end sub

fuction aaa()
…………
end fuction

其一、同一个名称的过程的函数不能同时使用。
其二、sub过程无法返回某个直,可以调用直接输出。如下:

sub aaa(f)
response.write f
end sub

fuction aaa(f)
aaa=f&","
end fuction

fuction aaa()
…………
aaa = return_Value '函数要在最后返回一个值给函数才行
end fuction

调用
bbb = aaa()
response.write bbb
或直接
response.write aaa()