老鼠害怕84味道么:如何让第二个子程序调用第一个子程序里的数组?

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/06 07:16:12
如何让第二个子程序调用第一个子程序的数组?
下面的代码出错了,该如何个性?
<%
sub s1
dim aa(5)
for i=0 to 4
aa(i)=i
next
end sub

sub s2
for j=0 to 4
response.write aa(j)
next
end sub
call s1
call s2
%>

将数组定义为全局或公用,即不要在子程序中定义数组。