[Issue 4656] stdio.readf does not ignore white space
https://issues.dlang.org/show_bug.cgi?id=4656 --- Comment #6 from Andrei Alexandrescu --- alrighty --
[Issue 4656] stdio.readf does not ignore white space
https://issues.dlang.org/show_bug.cgi?id=4656 Vladimir Panteleev changed: What|Removed |Added Status|REOPENED|RESOLVED CC||thecybersha...@gmail.com Resolution|--- |WORKSFORME --- Comment #5 from Vladimir Panteleev --- (In reply to Andrei Alexandrescu from comment #3) > Let's keep it opened until the error message is fixed. What is there to be fixed?(In reply to SomeDude from comment #4) > The original test case now produces this message: "Unexpected ' '" seems like an improvement, so I think this can now be closed. --
[Issue 4656] stdio.readf does not ignore white space
http://d.puremagic.com/issues/show_bug.cgi?id=4656 SomeDude changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #4 from SomeDude 2012-04-21 15:22:11 PDT --- The original test case now produces this message: PS E:\DigitalMars\dmd2\samples> rdmd bug.d 456 45646 std.conv.ConvException@E:\DigitalMars\dmd2\windows\bin\..\..\src\phobos\std\conv.d(1779): Unexpected ' ' when converting from type LockingTextReader to type int -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4656] stdio.readf does not ignore white space
http://d.puremagic.com/issues/show_bug.cgi?id=4656 Andrei Alexandrescu changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID | --- Comment #3 from Andrei Alexandrescu 2011-05-09 11:27:57 PDT --- Let's keep it opened until the error message is fixed. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4656] stdio.readf does not ignore white space
http://d.puremagic.com/issues/show_bug.cgi?id=4656 Ali Cehreli changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||INVALID --- Comment #2 from Ali Cehreli 2011-05-09 10:42:43 PDT --- My apologies for forgetting about this bug report. I have since then replaced din and dout with stdin and stdout in D.ershane. The nazi whitespace behaviour worked correctly and consistently in all of the examples. Thank you, Ali -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4656] stdio.readf does not ignore white space
http://d.puremagic.com/issues/show_bug.cgi?id=4656 --- Comment #1 from Andrei Alexandrescu 2011-05-09 09:18:02 PDT --- This is by design. The example works when modified as follows: import std.stdio; void main() { int i, j; readf("%s", &i); readf(" %s", &j); } The space before the second parameter tells readf to read and skip all whitespace before attempting conversion. I've implemented readf to be a fair amount more Nazi about whitespace than scanf in an attempt to improve its precision. Scanf has been famously difficult to use for complex input parsing and validation, and I attribute some of that to its laissez-faire attitude toward whitespace. I'd be glad to relax some of readf's insistence on precise whitespace handling if there's enough evidence that that serves most of our users. I personally believe that the current behavior (strict by default, easy to relax) is best. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4656] stdio.readf does not ignore white space
http://d.puremagic.com/issues/show_bug.cgi?id=4656 Andrei Alexandrescu changed: What|Removed |Added Status|NEW |ASSIGNED CC||and...@metalanguage.com AssignedTo|nob...@puremagic.com|and...@metalanguage.com -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---