浏览模式: 普通 | 列表
7月, 2009 | 1

asp 二维数组排序/一维数组排序

[ 2009-07-31 10:33:33 | 作者: admin ]
asp 二维数组排序/一维数组排序

Function Sort(ary)
      Dim KeepChecking,I,FirstValue,SecondValue
      IF Not IsArray(ary) Then Exit Function
      KeepChecking = True
      Do Until KeepChecking = False
          KeepChecking = False
          For I = 0 To UBound(ary)
              IF I = UBound(ary) Then Exit For
              IF ary(I) > ary(I + 1) Then
                 FirstValue = ary(I)
                 SecondValue = ary(I+1)
                 ary(I) = SecondValue
...

阅读全文…
1