pan
Rookie
Posts: 27
Received Likes: 2
|
Post by pan on May 8, 2016 2:45:29 GMT
"weird text output" Instead of text Returns number with comma. Can you run exploration to confirm, please? SetOption("NoDefaultColumns", True );
AddColumn( Null, "test 1", 1, colorDefault, colorDefault, 150); AddColumn( Null, "test 2", 1, colorDefault, colorDefault, 150); AddColumn( Null, "test 3", 1, colorDefault, colorDefault, 150);
Buy= L<H; for(i=1; i<=20; i++) { t= "\t"; bug = WriteIf( Buy[i], "10to25= "+ i,"" ) ; bug += t+ WriteIf( Buy[i], "20to500= "+ i,"" ) ; bug += t+ WriteIf( Buy[i], "300to55= "+ i,"" ) ;
addRow(bug ); }
|
|
andwilson
Private Group
Posts: 43
Received Likes: 13
|
Post by andwilson on May 8, 2016 12:18:34 GMT
Confirmed in 6.13, and the problem looks like to be AddRow, because bug string display ok in TRACE
|
|
fxshrat
Private Group
Posts: 566
Received Likes: 211
|
Post by fxshrat on May 8, 2016 18:07:14 GMT
I don't think it is AddRow since it is just text output. It rather seems that thousands separator setting of Tools-Preferences-Miscellaneous seems to be the cause.
Also this code does output properly.
SetOption("NoDefaultColumns", True );
AddTextColumn( "", "test 1", 1, colorDefault, colorDefault, 150); AddTextColumn( "", "test 2", 1, colorDefault, colorDefault, 150); AddTextColumn( "", "test 3", 1, colorDefault, colorDefault, 150);
Buy= L<H; for(i=1; i<=20; i++) { t= "\t"; bug = WriteIf( Buy[i], "10to25= "+ i,"" ) ; bug += t+ WriteIf( Buy[i], "20to500= "+ i,"" ) ; bug += t+ WriteIf( Buy[i], "300to55= "+ i,"" ) ;
AddRow( bug ); }
Instead of AddColumn I have used AddTextColumn for column initialization.
|
|
fxshrat
Private Group
Posts: 566
Received Likes: 211
|
Post by fxshrat on May 8, 2016 18:11:07 GMT
It is related to below setting. If you remove thousands separator then AddRow outputs properly with Using AddColumn( Null,...
|
|
pan
Rookie
Posts: 27
Received Likes: 2
|
Post by pan on May 8, 2016 22:28:40 GMT
So yes, by using AddTextColumn() we have correct output. And also SetSortColumns() can do the sorting correctly on that TextColumn
Thanks a lot. Problem SOLVED
|
|
fxshrat
Private Group
Posts: 566
Received Likes: 211
|
Post by fxshrat on May 9, 2016 5:10:55 GMT
So yes, by using AddTextColumn() we have correct output. And also SetSortColumns() can do the sorting correctly on that TextColumn Thanks a lot. Problem SOLVED I dont think it is solved. It should still output proper string if using Adddcolumn( Null,… Go here support@amibroker.com
|
|