Thread overview | ||||||
---|---|---|---|---|---|---|
|
April 13, 2011 How do I flush the output of write? | ||||
---|---|---|---|---|
| ||||
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 Re: How do I flush the output of write? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrej Mitrovic | 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 Re: How do I flush the output of write? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steven Schveighoffer | I kept trying to do flush(stdout), but I had the syntax wrong I guess. :) Thx. |
April 13, 2011 Re: How do I flush the output of write? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrej Mitrovic | 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
|
Copyright © 1999-2021 by the D Language Foundation