Arrays 动态数组经典asp

Arrays 动态数组经典asp,arrays,Arrays,我是asp的新手 你知道为什么这个脚本有错误吗 <% Dim i Dim prueba() for i=0 to 9 prueba(i) = i next %> 谢谢你的帮助 在VBScript中,必须使用Redim Preserve <% Dim i Dim prueba() Redim preuba(-1) For i = 0 to 9 Redim Preserve pr

我是asp的新手

你知道为什么这个脚本有错误吗

<%
    Dim i
    Dim prueba()
    for i=0 to 9
        prueba(i) = i
    next
%>


谢谢你的帮助

在VBScript中,必须使用Redim Preserve

<%
    Dim i
    Dim prueba()
    Redim preuba(-1)

    For i = 0 to 9
        Redim Preserve preuba(Ubound(preuba)+1)
        preuba(i) = i
    Next

%>


当您尝试加载脚本所在的页面时,您看到了什么错误?Classic ASP有点生锈,但是否需要Dim prueba后面的括号?