我的世界怎么提高fps:asp随机数为什么不随机

来源:百度文库 编辑:杭州交通信息网 时间:2024/05/03 05:52:11
<%
sm=20 'request.Form("sm")

dim cardid(100)
dim cdpassword(100)
for i=0 to sm-1
cardid(i)=Right((int(36582918256*rnd*2)),10)
cdpassword(i)=int((126457898*rnd*2))
next
for i=0 to sm-1
response.Write cardid(i)&"<br>"
next

%>
以上是原码为什么没次生成的都是着
1621973883
2400964328
2092278802
1025612469
9592843664
3318272402
3114265633
7330086311
3760063466
9475106519
8402437645
3914703446
4292835688
5560124781
9300630538
0713129597
3106604128
6651465786
0858707516
7847441500
20个数啊?

需要调用 Randomize

<%
sm=20 'request.Form("sm")

dim cardid(100)
dim cdpassword(100)

for i=0 to sm-1
Randomize
cardid(i)=Right((int(36582918256*rnd*2)),10)
cdpassword(i)=int((126457898*rnd*2))
next
for i=0 to sm-1
response.Write cardid(i)&"<br>"
next

%>

请先 调用 Randomize

就是少了一个产生随机数的种子函数