sorting arrays


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: sorting arrays

  1. #1
    Join Date
    Nov 2003
    Posts
    1

    Arrow sorting arrays

    Hi I have the following vb array that I want to sort...
    (2264,.11/1849,.33/3456,.1/3786,1/)
    we have (database results ID, rate of that result/.....
    What I want to do is split at "/" sort the arrays descending using the second number.
    So I should end up with
    (3786,1/1849,.33/2264,.11/3456,.1/)
    I have tis code but it would only work if my string was single entities like (4,3,6,9)

    <script language=JScript runat=server>
    function SortVBArray(arrVBArray) {
    return arrVBArray.toArray().sort().join('\b');
    }
    </script>

    <%
    Function SortArray(arrInput)
    SortArray = Split(SortVBArray(arrInput), "/")
    End Function
    %>

    Any help most appreciated.
    Thank you, John.

  2. #2
    Join Date
    Mar 2003
    Posts
    834
    Thsi is a Java forum, not Javascript, you'll get more luck with one of those forums.
    ArchAngel.
    O:-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center