Thread overview
How do I flush the output of write?
Apr 13, 2011
Andrej Mitrovic
Apr 13, 2011
Andrej Mitrovic
April 13, 2011
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.
April 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
April 13, 2011
I kept trying to do flush(stdout), but I had the syntax wrong I guess. :)

Thx.
April 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