September 30, 2010 [Issue 4959] New: std.conv.parse error "no digits seen" on string starting with zero | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=4959 Summary: std.conv.parse error "no digits seen" on string starting with zero Product: D Version: D2 Platform: Other OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody@puremagic.com ReportedBy: bugzilla@kyllingen.net --- Comment #0 from Lars T. Kyllingstad <bugzilla@kyllingen.net> 2010-09-30 06:24:18 PDT --- Test case: auto s = "0 "; auto f = parse!double(s); // std.conv.ConvError: no digits seen The problem is that when the string starts with '0', parse() skips that char to check if the next one is 'x' (to determine whether it's a hex number). When it is not a hex number, like in the example above, the zero is simply discarded. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
September 30, 2010 [Issue 4959] std.conv.parse error "no digits seen" on string starting with zero | ||||
---|---|---|---|---|
| ||||
Posted in reply to Lars T. Kyllingstad | http://d.puremagic.com/issues/show_bug.cgi?id=4959 Lars T. Kyllingstad <bugzilla@kyllingen.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #1 from Lars T. Kyllingstad <bugzilla@kyllingen.net> 2010-09-30 06:44:00 PDT --- http://www.dsource.org/projects/phobos/changeset/2074 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation