ASP sorting does not directly support system functions, and the numerical sorting, character sorting, and pinyin sorting we often need to use are inseparable from sorting. Copy the code code as follows:
'Sort
Function Sort1(ary)
Dim KeepChecking,I,FirstValue,SecondValue
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
ary(I+1) = FirstValue
KeepChecking = TRUE
End If
Next
Loop
Sort1=ary
End Function
Dim arr
arr = Array(a,c,b)
arr = Sort1(arr)
For i=0 to ubound(arr)
Response.Write(arr(i)&<br />)
Next