Page 1 of 1

Posted: Wed Mar 19, 2003 10:36 pm
by BackupUser
Restored from previous forum. Originally posted by ajm.

Hi

Can somebody tell me how to output to stdout or stderr from a windows or console application.

I have tested printn with the following code.

if openconsole()
printn("Hello")
printn("How are you")
endif

when compiled as a console exe and run from a cmd window I get the output.

when run from within an editor to capture the output I get nothing.

I have compiled with the debugger and it seems that the openconsole fails.



Thanks

Andy

Registered PB User
Windows XP Home

Posted: Thu Mar 20, 2003 12:20 am
by BackupUser
Restored from previous forum. Originally posted by Kale.

I would also like a 'proper' StdOut(string$) and StdError(string$) command. c'mon Fred:) i don't think Print[N](string$) does the job properly.

--Kale

In love with PureBasic! :)

Posted: Thu Mar 20, 2003 8:20 am
by BackupUser
Restored from previous forum. Originally posted by Rings.

this is not the same ?

viewtopic.php?t=3704

Its a long way to the top if you wanna .....CodeGuru

Posted: Thu Mar 20, 2003 9:16 am
by BackupUser
Restored from previous forum. Originally posted by ajm.

Hi Rings

The code you have pointed to is great if you want to capture the output from a prgram yourself, and have used it several times.

The problem I have is that the output from a console application created in PureBasic, does not seem to be captured and displayed in any of the editors that I have tried. ( I configure editor to run my console program as a tool and capture the output ).

The program runs but the openconsole command fails.

Any ideas ?



Thanks

Andy

Registered PB User
Windows XP Home