digitalmars.D.learn - How do I flush the output of write?
- Andrej Mitrovic (1/1) Apr 13 2011 Calling write doesn't automatically flush the output to the screen. Is t...
- Steven Schveighoffer (3/6) Apr 13 2011 stdout.flush();
- Andrej Mitrovic (2/2) Apr 13 2011 I kept trying to do flush(stdout), but I had the syntax wrong I guess. :...
- Steven Schveighoffer (6/7) Apr 13 2011 fflush(stdout) is the way to do it in C, so that's probably where you go...
Calling write doesn't automatically flush the output to the screen. Is there a function I could call to do it manually? writeln doesn't suffer from this problem.
Apr 13 2011
On Wed, 13 Apr 2011 14:00:04 -0400, Andrej Mitrovic <none none.none> wrote:Calling write doesn't automatically flush the output to the screen. Is there a function I could call to do it manually? writeln doesn't suffer from this problem.stdout.flush(); -Steve
Apr 13 2011
I kept trying to do flush(stdout), but I had the syntax wrong I guess. :) Thx.
Apr 13 2011
On Wed, 13 Apr 2011 15:41:07 -0400, Andrej Mitrovic <andrej.mitrovich gmail.com> wrote:I kept trying to do flush(stdout), but I had the syntax wrong I guess. :)fflush(stdout) is the way to do it in C, so that's probably where you got it from. in D, stdout is actually a File struct, which contains a flush method. -Steve
Apr 13 2011