halting problem :)

Steven Schveighoffer schveiguy at yahoo.com
Tue Jan 27 15:20:37 PST 2009


"Saaa" wrote
>
> No, normally writefln suffices.. :)
> btw. Why do writef writes not always show up at the expected places?
>

It's tough to insert writefln's after main exits :)  That's probably where 
your code is hanging (seeing as how your final message is successfully 
printed).

And to answer your second question, writef and writefln use C's FILE * 
interface I believe underneath, which is set to flush only on a newline 
being written.  If you want to flush even when a newline is not written, use 
fflush(stdout).

-Steve 




More information about the Digitalmars-d-learn mailing list