An effort at creating a free ebook for learning D

Ali Çehreli acehreli at yahoo.com
Wed Jun 22 11:09:25 PDT 2011


On Mon, 20 Jun 2011 16:13:37 -0600, Kai Meyer wrote:

> I wrote some code a while back that was intended to be portable (between
> windows and linux anyway). I used 'writef("Hello\n");' a lot, and those
> always printed correctly on windows. Does writef do something different
> than write with the '\n' character?

(I can't see Jose Armando Garcia's answer to this question. For some 
reason it appears empty in my news reader (Pan 0.133).)

As far as I know, "text mode" file access already translates those 
characters. '\n' always means "new line" to be replaced with each 
platform's correct code sequence.

Ali


More information about the Digitalmars-d-learn mailing list