Thomymaster Posted April 8, 2016 Posted April 8, 2016 Hi I have a 2d array (from a DB) and i need to fill a listview. For this, i need to convert every row in this 2d array to a string (columns delimitered by "|") I used the example for _ArrayToString() but noticed that if you want only the first element of a 2d array ( 0 , 0) then the output is buggy. #include <Array.au3> #include <MsgBoxConstants.au3> #include <Array.au3> #include <MsgBoxConstants.au3> Local $aArray[10][10] For $i = 0 To 9 For $j = 0 To 9 $aArray[$i][$j] = $i & "-" & $j Next Next _ArrayDisplay($aArray, "2D Array") MsgBox($MB_SYSTEMMODAL, "Rows 4-7, cols 2-5", _ArrayToString($aArray, " :: ", 0, 0)) (i.e. 1, 1 or 2, 5 works) What can i do to solve this issue or what am i making wrong? Best, Thomas
Developers Jos Posted April 8, 2016 Developers Posted April 8, 2016 (edited) Not sure what your problem is you see. What is the msgbox showing for you and what are you expecting? I get this as expected: 0-0 :: 0-1 :: 0-2 :: 0-3 :: 0-4 :: 0-5 :: 0-6 :: 0-7 :: 0-8 :: 0-9 Jos Edited April 8, 2016 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.
Thomymaster Posted April 8, 2016 Author Posted April 8, 2016 I saw the whole array as the output in MsgBox. I was running v3.3.12.0, after an update to 3.3.14.2 it was working as expected Best, Thomas
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