当前位置: 代码迷 >> ASP.NET >> 求助数组取值有关问题
  详细解决方案

求助数组取值有关问题

热度:1678   发布时间:2013-02-26 00:00:00.0
求助数组取值问题
Function   Sjhanshu(ByVal   lowerbound   As   Integer,   ByVal   upperbound   As   Integer,   ByVal   i   As   Integer)   As   Integer   '这是一个产生随机数字的函数参数说明(数组下限,数组上限,产生随机数的个数)
                '这是产生随机数字用的代码
                Return   (CInt(Int((upperbound   -   lowerbound   +   1)   *   Rnd()   +   lowerbound)))

End   Function
sub   test()
dim   str()   as   string
response.write(str(Sjhanshu(1,100,1))) '这里存在问题不能从数组中取得相应的数据为什么?  
end   sub
为什么不能取出str(Sjhanshu(1,100,1))所对应的数值!
谢谢

------解决方案--------------------------------------------------------
str这个数组根本就没有初始化.
  相关解决方案