3 ms·
Indeed they do not translate into the same thing. But neither makes your program more or less portable in itself. It all depends on what you want to use it for.
by jeltz 15y ago
Indeed they do not translate into the same thing. But neither makes your program more or less portable in itself. It all depends on what you want to use it for. Some files and protocols should always have \n some always \r\n while in some cases it should be the system line separator. I think Python, Perl, C, and Ruby have fixed that quite well by making the IO library do the conversions. I do not remember if it is the same in Java.