This is on Windows 7. Using a def file to stop the terminal window coming up.

win.def
EXETYPE NT
SUBSYSTEM WINDOWS

bug.d
import std.stdio;
import std.string;

void main() {
        auto f = File( "z.txt", "w" );
        scope( exit )
                f.close;
        string foo = "bar";
        foreach( n; 0 .. 10 ) {
                writefln( "%s", foo );
                f.write( format( "count duck-u-lar: %s\n", n ) );
        }
}

output (from in z.txt):
count duck-u-lar: 0

Reply via email to