rudi Posted October 30, 2009 Share Posted October 30, 2009 Hi. See here, pls: #include <array.au3> Dim $DemoArr[3][5] = [["2"], _ ["0/1/2/3/4", "A", "B", "C", "D"], _ ["0|1|2|3|4", "A", "B", "C", "D"]] _ArrayDisplay($DemoArr, '"|" is splitting to next row') Propably wad? Regards, Rudi Earth is flat, pigs can fly, and Nuclear Power is SAFE! Link to comment Share on other sites More sharing options...
GEOSoft Posted October 30, 2009 Share Posted October 30, 2009 Hi. See here, pls: #include <array.au3> Dim $DemoArr[3][5] = [["2"], _ ["0/1/2/3/4", "A", "B", "C", "D"], _ ["0|1|2|3|4", "A", "B", "C", "D"]] _ArrayDisplay($DemoArr, '"|" is splitting to next row') Propably wad? Regards, Rudi First off: What version of AutoIt are you running? I thought we got rid of that problem earlier. Secondly it's becuase of the way your array is constructed. Look at the $sSeparator and $sReplace parameters and adjust accordingly. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
AndyG Posted October 30, 2009 Share Posted October 30, 2009 This is because you used _arraydisplay() not with the right syntax^^ #include <array.au3> Dim $DemoArr[3][5] = [["2"], _ ["0/1/2/3/4", "A", "B", "C", "D"], _ ["0|1|2|3|4", "A", "B", "C", "D"]] _ArrayDisplay($DemoArr, '"|" is splitting to next row') _ArrayDisplay($DemoArr, '"|" is splitting to next row',-1,0,chr(244)) The pipe |-symbol is used as a (standard) seperator in the _arraydisplay()-function. So if you use the pipe as a "letter-character" in your string, _arraydisplay() will not work properly. In that case, you have to take an other seperator, in my example the chr(244) Andy Link to comment Share on other sites More sharing options...
GEOSoft Posted October 30, 2009 Share Posted October 30, 2009 This is because you used _arraydisplay() not with the right syntax^^ #include <array.au3> Dim $DemoArr[3][5] = [["2"], _ ["0/1/2/3/4", "A", "B", "C", "D"], _ ["0|1|2|3|4", "A", "B", "C", "D"]] _ArrayDisplay($DemoArr, '"|" is splitting to next row') _ArrayDisplay($DemoArr, '"|" is splitting to next row',-1,0,chr(244)) The pipe |-symbol is used as a (standard) seperator in the _arraydisplay()-function. So if you use the pipe as a "letter-character" in your string, _arraydisplay() will not work properly. In that case, you have to take an other seperator, in my example the chr(244) Andy That's why I asked about the version. This code in _ArrayDisplay() should have caught that I think. ; Check the separator to make sure it's not used literally in the array If _ArraySearch($avArray, $sSeparator, 0, 0, 0, 1) <> -1 Then For $x = 1 To 255 If $x >= 32 And $x <= 127 Then ContinueLoop Local $sFind = _ArraySearch($avArray, Chr($x), 0, 0, 0, 1) If $sFind = -1 Then $sSeparator = Chr($x) ExitLoop EndIf Next EndIf I'll look at it again over the weekend. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
rudi Posted October 31, 2009 Author Share Posted October 31, 2009 Hi.The pipe |-symbol is used as a (standard) seperator in the _arraydisplay()-function. So if you use the pipe as a "letter-character" in your string, _arraydisplay() will not work properly.That's exactly what I missed.Thanks , Rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE! 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