writef

Claus D. Volko cdvolko at gmx.net
Sun Jan 11 07:15:45 PST 2009


Thanks for your answer. It sounds plausible to me. Do you know how to manually cause a flush? I've found this code snippet:

import std.cstream;

...

dout.writefln("Hello");
dout.flush();

Using doubt.writef and dout.flush, it works as intended. But can it also be done without importing std.cstream? There doesn't seem to be a function flush in std.stdio.

Jason House Wrote:
> I'm going to guess the answer is flushing.  I suspect writefln will flush the output following the implied newline, but writef won't.  This is similar to most console output libraries I use.  For example, C++ uses std::endl for a flushed newline and "\n" for just a newline without flushing.




More information about the Digitalmars-d mailing list