sumitd Posted August 6, 2013 Author Share Posted August 6, 2013 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 More sharing options...
FireFox Posted August 6, 2013 Share Posted August 6, 2013 Have you tried the examples provided by me and czardas?Br, FireFox. Link to comment Share on other sites More sharing options...
sumitd Posted August 6, 2013 Author Share Posted August 6, 2013 @FireFox ... Yes. In both cases i get an "array variable has incorrect number of subscripts" error. Link to comment Share on other sites More sharing options...
FireFox Posted August 6, 2013 Share Posted August 6, 2013 (edited) Your array must have 1 dimension.If you make an _ArrayDisplay of your array you should only have 1 col. Edited August 6, 2013 by FireFox Link to comment Share on other sites More sharing options...
sumitd Posted August 6, 2013 Author Share Posted August 6, 2013 @ Firefox .. Yes all version names are stored in 1D array. Function provided by you and czardas also uses 1D array.. still the error Link to comment Share on other sites More sharing options...
FireFox Posted August 6, 2013 Share Posted August 6, 2013 What does this script return? (replace $avArray by your array) ConsoleWrite(UBound($avArray, 0) & ", " & UBound($avArray, 1) & @CrLf) Link to comment Share on other sites More sharing options...
Edano Posted August 6, 2013 Share Posted August 6, 2013 (edited) 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 August 6, 2013 by Edano [color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font] Link to comment Share on other sites More sharing options...
Edano Posted August 6, 2013 Share Posted August 6, 2013 (edited) here is a similar thread with solution (?) '?do=embed' frameborder='0' data-embedContent>> didn't check it deeply tho another one Edited August 6, 2013 by Edano [color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font] Link to comment Share on other sites More sharing options...
czardas Posted August 6, 2013 Share Posted August 6, 2013 @FireFox ... Yes. In both cases i get an "array variable has incorrect number of subscripts" error. I have no idea how you managed that. I ran both examples without error. Anyway @FireFoxI like your version better. operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
FireFox Posted August 6, 2013 Share Posted August 6, 2013 @FireFox I like your version better. Thanks, I havn't tested yours so I don't know which one is faster/more reliable. Link to comment Share on other sites More sharing options...
FireFox Posted August 6, 2013 Share Posted August 6, 2013 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 More sharing options...
czardas Posted August 7, 2013 Share Posted August 7, 2013 (edited) 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 August 7, 2013 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now