Doubled newlines
bearophile
bearophileHUGS at lycos.com
Sat Jul 31 18:15:21 PDT 2010
I think there is a bug here, but can you please try it a bit?
The name of this program is "test.d", so it loads its souce code:
import std.file: readText;
import std.stdio: write;
void main() {
string s = readText("test.d");
write(s);
}
On windows the output is:
import std.file: readText;
import std.stdio: write;
void main() {
string s = readText("test.d");
write(s);
}
So it shows extra newlines (on Windows newlines are two chars).
On Windows a similar Python program doesn't show the doubled newlines:
s = open("test.d").read()
print s
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list