莫名的数组越界 快晕死啦
晕,VB用的不熟,这个怎么就越界啦?
实在是想不通
大家帮忙看看
Dim num(9) As Integer
Dim i As Integer
Dim j, middle As Integer
For i = 0 To 9
num(i) = Rnd() * 90 + 10
Next i
For i = 0 To 9
middle = num(i)
j = i - 1
Do While j >= 0
If num(i) > num(j) Then
num(j + 1) = num(j)
j = j - 1
End If
Loop
num(j + 1) = middle
Next i
For i = 0 To 9
Label1.Text &= num(i) & " "
Next
[此贴子已经被作者于2007-10-11 10:43:59编辑过]