Problem with CONSOLE
issueid=541 28-05-2018 14:02
Junior Member
Number of reported issues by MBuckingham: 3
Problem with CONSOLE
Redirection of output does not work

There seems to be a bug in the CONSOLE module for version 1.10.4.0 The simplest way to demonstrate this is with a very simple program named ct01:-



'---Load Console Module
Uses "Console"


Console_Writeline "Hello"



If I run this with version 1.9.16.17 from a command box like this:-

C:\Temp>\thinBasic\thinBasicc.exe ct01.tbasicc

then it prints Hello as expected. If I then type:-

C:\Temp>\thinBasic\thinBasicc.exe ct01.tbasicc >thinOK.txt

the file thinOK.txt is created and contains the one line of text as expected.


With version 1.10.4.0 printing to the command line works as before. However redirecting the output to a text file simply creates an empty text file.


In my real application I'm running Thinbasic scripts from the software and capturing the output, and this is where I first saw the bug.



Thanks,
Malcolm Buckingham
Issue Details
Issue Number 541
Project thinBasic
Category Unknown
Status Unconfirmed
Priority 5 - Medium
Affected Version 1.10.2
Fixed Version (none)
Milestone (none)
Users able to reproduce bug 0
Users unable to reproduce bug 0
Assigned Users (none)
Tags (none)




31-05-2018 10:48
thinBasic author
Dear Malcolm,

have a look at this discussion: http://www.thinbasic.com/community/s...utput+redirect
Console module is not using standard output but I made a development in order to be able to redirect console output to a file.

Let me know if it works
Eros

31-05-2018 17:48
Junior Member
Eros,

Thanks for getting back me. I'm off on holiday tomorrow ( to Italy ) so I'll have a look at the discussion when I get back.

Malcolm

Quote Originally Posted by ErosOlmi
Dear Malcolm,

have a look at this discussion: http://www.thinbasic.com/community/s...utput+redirect
Console module is not using standard output but I made a development in order to be able to redirect console output to a file.

Let me know if it works
Eros

+ Reply