www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - continued: Bug or what?

reply Tomás Rossi <Tomás_member pathlink.com> writes:
Also, writefln or writef("\n") doesn't seems to suffer from this.
Setting a writefln("") just before the pause call fixes all.
Maybe it has something to do with the newline. Neglecting to flush until a
newline?


Tom
Nov 13 2005
parent Tom S <Tom_member pathlink.com> writes:
This is normal behaviour. Console output is buffered. The buffer is flushed on
each newline character. It's the same in C, C++ or whatever. You can flush the
buffer manually by saying:

fflush(stdout);


Also, writefln or writef("\n") doesn't seems to suffer from this.
Setting a writefln("") just before the pause call fixes all.
Maybe it has something to do with the newline. Neglecting to flush until a
newline?
-- Tomasz Stachowiak a.k.a. h3r3tic
Nov 14 2005