Register
4coder»Forums»printf to buffer only appearing after buffer get to a size
Chris Crew
3 posts
printf to buffer only appearing after buffer get to a size
5 months ago Edited by Chris Crew on May 25, 2020, 12:12 p.m. Reason: Initial post
When launching my application from within 4coder any printf statements should appear in the *run* buffer, however they all start to appear after the buffer.

For example I place a loop at first line of main to prinf "Test\n" and it only start to appear on screen after the loop was set to greater than ~760 .

Is this a bug? or is there an option in the config? I can change to make this display all printf calls.
Simon Anciaux
900 posts
printf to buffer only appearing after buffer get to a size
5 months ago Edited by Simon Anciaux on May 25, 2020, 10:18 p.m. Reason: Note
I'm not sure I understand what your problem is. Do you mean that the output doesn't go into the *run* buffer ? If so how do you launch your program ?

crewy
it only start to appear on screen after the loop was set to greater than ~760 .


I don't understand what you mean there. Could you rephrase it ? Or give code example ?

Edit: I did a simple test, and it seems that printf is buffering the output a lot more than it would in a console. You can solve that by adding fflush( stdout ); after printf when you want to be sure that the output has been "sent to the screen". And it might be a good idea to fill an issue on the 4coder github.