伊豆旅店:如何让第二个子程序调用第一个子程序里的数组?

来源:百度文库 编辑:神马品牌网 时间:2024/07/07 09:57:05
如何让第二个子程序调用第一个子程序的数组?
下面的代码出错了,该如何个性?
<%
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
%>

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