write to file ... trivial?

Dr. Smith iam at far.out
Wed Oct 6 14:36:23 PDT 2010

Thank you.  Indeed, I forgot: auto f = File("outfile.txt", "w");

Interestingly, this apparently works within a for-loop to overwrite the file on
the first iteration and appending otherwise (Should there not be an explicit
append arg?):

for(int i = 0; i < 100; i++) {
  f.writefln("%s%i", "World Hello", i);
} f.close();                 // f.close outside the loop for efficiency?

If someone could point me to the online documentation for this matter, I'd
appreciate it.  I'd prefer to use this forum for less elementary matters.

More information about the Digitalmars-d-learn mailing list