彩贝财经app:如何让第二个子程序调用第一个子程序里的数组?

来源:百度文库 编辑:高考问答 时间:2024/07/06 14:35:03
如何让第二个子程序调用第一个子程序的数组?
下面的代码出错了,该如何个性?
<%
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
%>

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