Bug 20392 – formattedRead: %*d and %d should read the same

Status
NEW
Severity
normal
Priority
P3
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-11-14T18:14:48Z
Last change time
2024-12-01T16:36:03Z
Assigned to
No Owner
Creator
berni44
Moved to GitHub: phobos#9784 →

Comments

Comment #0 by bugzilla — 2019-11-14T18:14:48Z
This throws an exception: --- import std.format; void main() { string str = "foo bar buzz"; string a, c; int b; formattedRead(str, "%s %d %s", &a, &b, &c); } --- This not: --- import std.format; void main() { string str = "foo bar buzz"; string a, c; formattedRead(str, "%s %*d %s", &a, &c); } --- The reason is, that %*d accepts an empty string as a number while %d doesn't.
Comment #1 by robert.schadek — 2024-12-01T16:36:03Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/9784 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB