双重循环问题!!
Public Sub Sort(a() As Integer)Dim start As Integer, finish As Integer
Dim i As Integer, j As Integer, t As Integer
start = LBound(a)
finish = UBound(a)
For i = finish To 2 Step -1
For j = 1 To i - start
If a(j) < a(j + 1) Then
t = a(j + 1)
a(j + 1) = a(j)
a(j) = t
End If
Next
Next
End Sub
目的是实现数组的降序排列,可为什么
For i = finish To 2 Step -1
For j = 1 To i - start
这样写,请告知!!!