andyswarbs Posted February 11, 2006 Share Posted February 11, 2006 _ArraySort in two dimensions. I keep on trying to get this to work. But try as I may somehow I think it simply don't work. Can someone either provide a worked example, or admit defeat. If the latter then I may start to work on this. Licensing.au3Extended _Max & _Min_MsgBoxExitVarious extensions to _GuiCtrl...Run Dos programs output into an array etc (Updated 19-Feb-06)Extensions to Array library, primarily in two dimensions (updated 20-Feb-06)Version dependency calculator, _IsVer1GEVer2User Management, answering some domain questions (updated 19-Feb-06, various bugfixes and new functions added)Extensions to registry manipulation, including a recursive search & replaceDelimited string library (updated 19-Feb-03, added _DelimListSort)String library extensionsTerminal Server supportFile libraryCommand line parser (added 18-Feb-06)(UDF homepage) (Scit4Au3 UserCallTips added 21-Feb-06) Link to comment Share on other sites More sharing options...
Developers Jos Posted February 11, 2006 Developers Share Posted February 11, 2006 (edited) _ArraySort in two dimensions. I keep on trying to get this to work. But try as I may somehow I think it simply don't work. Can someone either provide a worked example, or admit defeat. If the latter then I may start to work on this.Please read the sticky at the top of the BUGs forum or post first in Support when you are not sure. All info for a Bug report is missing so moving to Support forum. Here is an example I have posted before that demonstrates a 2 dimension Array sorting: #include <Array.au3> Dim $avArray[10][2] $avArray[0][0] = "JPM" $avArray[1][0] = "Holger" $avArray[2][0] = "Jon" $avArray[3][0] = "Larry" $avArray[4][0] = "Jeremy" $avArray[5][0] = "Valik" $avArray[6][0] = "Cyberslug" $avArray[7][0] = "Nutster" $avArray[8][0] = "Tylo" $avArray[9][0] = "JdeB" For $x = 0 To 9 $avArray[$x][1] = $x Next ; Sort on first dim ConsoleWrite("*** Sort on first dimension" & @LF) _ArraySort($avArray, 0, 0, 0, 2, 0) DisplayArray($avArray) ; Sort on second dim to restore original order ConsoleWrite("*** Sort on second dimension, restore original order" & @LF) _ArraySort($avArray, 0, 0, 0, 2, 1) DisplayArray($avArray) Func DisplayArray($array) For $x = 0 To 9 ConsoleWrite($avArray[$x][0] & " - " & $avArray[$x][1] & @LF) Next EndFunc;==>DisplayArray Edited February 11, 2006 by JdeB 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 More sharing options...
andyswarbs Posted February 21, 2006 Author Share Posted February 21, 2006 Jdeb, thanks for coming back on this - much appreciated. Your example works just fine. I am trying to extend the example to make sure I really understand what is going on and why I did not understand it better before. If I get somewhere with something useful I will post back here. Licensing.au3Extended _Max & _Min_MsgBoxExitVarious extensions to _GuiCtrl...Run Dos programs output into an array etc (Updated 19-Feb-06)Extensions to Array library, primarily in two dimensions (updated 20-Feb-06)Version dependency calculator, _IsVer1GEVer2User Management, answering some domain questions (updated 19-Feb-06, various bugfixes and new functions added)Extensions to registry manipulation, including a recursive search & replaceDelimited string library (updated 19-Feb-03, added _DelimListSort)String library extensionsTerminal Server supportFile libraryCommand line parser (added 18-Feb-06)(UDF homepage) (Scit4Au3 UserCallTips added 21-Feb-06) 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