RT,执行下面代码时会抛出错误
Microsoft VBScript 编译器错误 错误 '800a0402'
缺少整型常数
/Exercise/test.asp,行 15
dim a(i)
------^
改成下面这样就不会抛错
请教一下大神,为什么不能在第一次声明时就使用 a(i)
Microsoft VBScript 编译器错误 错误 '800a0402'
缺少整型常数
/Exercise/test.asp,行 15
dim a(i)
------^
dim i
i = 2
dim a(i)
if err.number<>0 then
Response.write("ERROR--" & err.description)
end if
改成下面这样就不会抛错
dim i,a()
i = 2
redim a(i)
if err.number<>0 then
Response.write("ERROR--" & err.description)
end if
请教一下大神,为什么不能在第一次声明时就使用 a(i)