Bug 2301 – std.file.read error

Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2008-08-21T22:29:00Z
Last change time
2015-06-09T01:20:08Z
Keywords
diagnostic
Assigned to
bugzilla
Creator
davesun

Comments

Comment #0 by davesun — 2008-08-21T22:29:58Z
hello ,I write the codes as follows: import std.stdio; import std.file; int main() { string contents = "%%"; std.file.write("test.txt",contents); string chars = cast(string)std.file.read("test.txt"); writefln(chars); return 0; } the output string is: % I think the result should be "%%"
Comment #1 by andrei — 2008-08-21T22:37:18Z
The program is behaving correctly. Change "writefln" to "writeln" to get the behavior you want.
Comment #2 by fvbommel — 2008-08-22T10:04:19Z
It's not nice to spam people.
Comment #3 by andrei — 2008-08-22T10:11:40Z
(In reply to comment #2) > It's not nice to spam people. > I didn't. Accusing people without reason would also not be nice, so let's see. If they are in the "Add CC" box by default, I could only assume they were interested in getting emails. Should I remove everyone from the CC box, or did I press the wrong button somewhere in the process? For all I know, I used all defaults, marked the issue as invalid, wrote in this box, and committed. Please advise.
Comment #4 by wbaxter — 2008-08-22T11:53:35Z
(In reply to comment #3) > (In reply to comment #2) > > It's not nice to spam people. > > > > I didn't. Accusing people without reason would also not be nice, so let's see. Not you, Andrei. It must have been Davesun, the original poster of the bug. Probably an innocent mistake.
Comment #5 by jarrett.billingsley — 2008-08-22T11:58:03Z
I was wondering why I was getting mails about this bug.
Comment #6 by bob-w — 2008-08-23T08:26:03Z
Ever since I have subscribed to d.puremagic.com I am getting spam mail. The nice thing is that I am now offered millions of $$$ every week from Nigerian banks and the like instead of Viagra and Rolex. So finally something I really need ...
Comment #7 by bob-w — 2008-08-23T08:39:47Z
Just trying to remove my email address ...