Jump to content

Sort Numeric Array - Different Lengths [Solved]


ken82m
 Share

Recommended Posts

I have an array of numbers

500

1200

60

600

1600

I tried _ArraySort but as I expected it doesn't sort proprtly.

Does anyone have any tips to sort these properly?

I could add 0's to make them the same length but I'm going to use these in a ComboBox and I'd rather they looked as is.

Thanks,

Kenny

Edited by ken82m

 "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains."

Link to comment
Share on other sites

  • Developers

How was the array filled with these values?

The thing to check is that you store the values numeric when you want them sorted on value.

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Your right I didn't think of that.

They were read from a large string I read from a file so they're written as text.

I should be able to convert that over and hopefully that's it.

Thanks! :mellow:

 "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains."

Link to comment
Share on other sites

Thanks! I just added an extra line to this script and that was it.

As usual I just need someone to point out what is so painfully obvious. :mellow:

I tend to make things overly complicated sometimes lol

For $i = 1 To $CompleteTable[0][2]
   $Bitrates[$i] = Number($Bitrates[$i])
   $CompleteTable[$i][1] = $Bitrates[$i]
Next

Thanks again,

Kenny

 "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains."

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...