VB排序算法源码,支持倒序顺序字符排序数字排序
Function 数字数组排序(Sz) Dim KeepChecking As Boolean Dim I As Long Dim FirstValue Dim SecondValue Dim Ub As Long Dim Ub2 As Long KeepChecking = True Ub = UBound(Sz) Ub2 = Ub - 1 While KeepChecking KeepChecking = False For I = 0 To Ub2 If Sz(I) > Sz(I + 1) Then FirstValue = Sz(I) SecondValue = Sz(I + 1) Sz(I) = SecondValue Sz(I + 1) = FirstValue KeepChecking = True End If Next Wend 数字数组排序 = Sz End Function