[Issue 11007] New: std.format.formattedRead with %*s specifier causes AssertError

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Sep 10 07:48:44 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=11007

           Summary: std.format.formattedRead with %*s specifier causes
                    AssertError
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: ttanjo at gmail.com


--- Comment #0 from Tomoya Tanjo <ttanjo at gmail.com> 2013-09-10 07:48:43 PDT ---
The following code throws AssertError with the message "format.d(3790): Format
specifier not understood: %s" in dmd v2.064-devel-fe5dfc5 on Linux 64bit.
It should throw an exception (not Error) or should be accepted.

---
import std.format;

void main()
{
    string str = "foo bar buzz";
    string a, b;
    formattedRead(str, "%s %*s %s", &a, &b);
}
---

If we use "%*d" instead of "%*s", it runs without errors.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list