首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

求助数组取值有关问题

2011-12-15 
求助数组取值问题FunctionSjhanshu(ByVallowerboundAsInteger,ByValupperboundAsInteger,ByValiAsInteger)

求助数组取值问题
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这个数组根本就没有初始化.

热点排行