Jump to content

Need to sort a string array


Recommended Posts

Exactly as FireFox pointed out. ArraySort doesn't work.

Eash array value is a version. Also there are no spaces in the input . Its simply the version numbers (5.50.0.1,5.40.980.2,6.50.660.0,5.50.0.100,6.50.1.9,6.40.4.8,..... and so on)

Regards,

sumitd

Link to comment
Share on other sites

yes i know. firefox. i am fully aware of the problems

my suggestion aimed to rewrite the obove algorithm so it fits the needs, instead of looping thru the array, then use arraysort and loop again thru the array as in csarda's last post.

understandable ? :)

Edited by Edano

[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Link to comment
Share on other sites

my suggestion aimed to rewrite the obove algorithm so it fits the needs, instead of looping thru the array, then use arraysort and loop again thru the array as in csarda's last post.

Sure, understood ;)

Link to comment
Share on other sites

yes i know. firefox. i am fully aware of the problems

my suggestion aimed to rewrite the obove algorithm so it fits the needs, instead of looping thru the array, then use arraysort and loop again thru the array as in csarda's last post.

understandable ? :)

 

My example has a 1D array input and output. I'm sure it can be improved though. For example: I didn't know about _VersionCompare() when I wrote it.

Edited by czardas
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...