flush and stdout

Tom Tom_member at pathlink.com
Wed May 17 09:31:19 PDT 2006


Is there an alternative to:

fflush(std.stdio.stdout); 

?

Certainly we can't do something like std.stdio.stdout.flush() as stdout doesn't
seem to be of Stream type (e.g. from dmd compiler "no property 'flush' for type
'_iobuf [60]'").

On the other hand one can do this:

File inp = new File("filename", FileMode.In);
scope(exit) inp.close();
..
inp.flush();

Is there a Stream object for stdout? If there is one, why it isn't included in
std.stream? If there isn't, why not to add one?

Thx,

--
Tom:



More information about the Digitalmars-d mailing list