[Issue 12260] New: Improve error of std.stdio.readf when involving whitespace
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Feb 25 19:57:09 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12260
Summary: Improve error of std.stdio.readf when involving
whitespace
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: Jesse.K.Phillips+D at gmail.com
--- Comment #0 from Jesse Phillips <Jesse.K.Phillips+D at gmail.com> 2014-02-25 19:56:51 PST ---
The following program will throw an exception on the second read.
------
void main()
{
import std.stdio;
int input;
readf("%s", &input);
readf("%s", &input);
}
------
The exceptions message points out the remaining newline from the first input:
--------
conv.d(1901): Unexpected '
' when converting from type LockingTextReader to type int
--------
It should probably convert whitespace into a more recognizable form:
-------
conv.d(1901): Unexpected '\n' when converting from type LockingTextReader to
type int
-------
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list