Problem in "print" aka "console_write" with a comma in arguments
issueid=539 21-03-2018 17:47
Member
Number of reported issues by dco045: 3
Problem in "print" aka "console_write" with a comma in arguments
tested in 1.9.16 and 1.10.4 too

Hi,

I found a curious comportement in console_write statement.

It seems that, using a comma as operand separator leads to insert an extra space in generated string printed

Particularely take a look at examples <<J>> & <<K>>

Best regards

Dany

My test program.
'---Load Console Module  
Uses "Console"

PrintL "Press a key to end program"


console_write "<<A>>" & "////"
console_write "(())" , 1  &  $CRLF   ' space between //// and (())

console_write "<<B>>"
console_write "////"
Console_Write "(())" & "====" , 2 &  $CRLF   ' space between //// and (())

console_write "<<C>>"
console_write "////"
Console_Write "(())" & "===="   &  $CRLF     ' OK no    space between //// and (())

Console_Write "<<D>>"
Console_Write "////" & "(())"
Console_Write   "===="   &  $CRLF     ' OK no    space between //// and (())

Console_Write "<<E>>"
Console_Write "////" & "(())"
Console_Write   "===="  , 5 &  $CRLF      '      space between  (()) and ====

Console_Write "<<F>>"
Console_Write "////" & "(())"
Console_Write   "====" &  $CRLF  , 6     '      space between  (()) and ====  although they are on differents statements

PrintL
Console_Write "<<G>>"
Console_Write "////" & "(())"
Console_Write   "====" &  "****" &  $CRLF  , 7   '      space between  (()) and ====  although they are on differents statements

PrintL
Console_Write "<<H>>"
Console_Write "////" & "(())"
Console_Write   "====" &  "****"
Console_Write $CRLF  , 8    ' OK  no extraneous space

PrintL
Console_Write "<<I>>"
Console_Write "////" & "(())"
Console_Write   "====" &  "****"
Console_Write   , 9   ' two spaces before  9

PrintL
Console_Write "<<J>>"
Console_Write "////" & "(())"
Console_Write   "====" &  "****"
Console_Write   10      ' OK

PrintL
Console_Write "<<K>>"
Console_Write "////" & "(())"
Console_Write   "====" &  "****"
Console_Write   10 , 11   ' space  before 10

PrintL $CRLF & $CRLF & "--waiting--"

WaitKey '---Wait for a key press
Issue Details
Issue Number 539
Project thinBasic
Category Core engine (thinCore.dll)
Status Under investigation
Priority 3
Affected Version 1.9.16.x
Fixed Version (none)
Milestone (none)
Users able to reproduce bug 0
Users unable to reproduce bug 0
Assigned Users (none)
Tags (none)




23-03-2018 01:27
thinBasic author
Thanks, I will have a look

+ Reply