I have the following D program:
void main( string[] args )
{
import core.thread, std.stdio;
for ( int i = 10; i > 0; --i )
{
writeln( i );
Thread.sleep(dur!"seconds"(1) );
}
writeln("Bang!");
}
It counts from 10 down to 1 and then outputs "Bang!"
. Between each output the program waits for the duration of one second. When I run this program in Eclipse (Eclipse Platform, Version: 3.8.1, Build id: debbuild) with the DDT plugin (Version: 0.8.1.v201309231) then the console output is as expected, but it apppears only until after the program has finished running.
When I start the same program from the console, then the program behaves as it should.
How can I fix that?