[求助]关于随机数~~~rnd()
<%
function rndlist(recordd)
k=recordd+1
k=int(rnd*1000)
rndlist=k
end function
dim k
for i=1 to 10
k(i-1)=rndlist(100)
next
for i=1 to 10
response.write k(i-1)&"<br>"
next
%>
上面这段代码~~~运行的结果是: 错误类型: Microsoft VBScript 运行时错误 (0x800A000D) 类型不匹配 /mc/try.asp, 第 10 行
<%
function rndlist(recordd)
k=recordd+1
do while k>recordd
k=cstr(int(rnd*1000))
loop
rndlist=k
end function
dim k
for i=1 to 10
k(i-1)=rndlist(100)
next
for i=1 to 10
response.write k(i-1)&"<br>"
next
%>
而这段却会死机~~~
各位大哥帮帮忙看一下是怎么回事???