Caranya adalah waktu memasukkan data ke array tersebut di-sort dulu.
Kalau datanya banyak, bikin aja program sortir.
Pertanyaannya apa? programnya atau arraynya.  Data di array sendiri nggak
bisa disortir tanpa dipaksa oleh program luar.

<%
'*** build example array to show that this thing can sort
'*** alpha-numeric arrays
Dim MyArray
MyArray = Array(1,5,"shawn","says","hello",123,12,98)
MyArray = Sort(MyArray)
For I = 0 to Ubound(MyArray)
    Response.Write MyArray(I) & "<br>" & vbCRLF
Next
Response.End


'*** Sorter Function that takes an array and sorts it
Function Sort(ary)
    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
    Sort = ary
End Function
%>




Purnomo Fitra wrote:

> Ada yang tau cara men-sort array di VBScript?
>
> PURNOMO FITRA
> ICQ  : 5031050
> eMail: [EMAIL PROTECTED]
> Telp.: +62 (21) 83701919
> Cell.: +62 (81) 8811052
> Fax  : +62 (21) 83701919
>
> --
> Berhenti langganan kirim email ke [EMAIL PROTECTED]
> Arsip di http://www.mail-archive.com/[email protected]/


-- 
Berhenti langganan kirim email ke [EMAIL PROTECTED]
Arsip di http://www.mail-archive.com/[email protected]/

Kirim email ke