[Issue 11007] std.format.formattedRead with %*s specifier causes AssertError
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Thu Nov 14 18:28:31 UTC 2019
    
    
  
https://issues.dlang.org/show_bug.cgi?id=11007
--- Comment #3 from berni44 <bugzilla at d-ecke.de> ---
I filed two more issues: Issue 20392 and Issue 20393 to distinguish between the
different problems.
Here the problem is, that this works, but the one above not.
---
import std.format;
void main()
{
    string str = "foo bar buzz";
    string a, b, c;
    formattedRead(str, "%s %s %s", &a, &b, &c);
}
---
IMHO %*s should be added (and several others like %*x) to fix this bug.
(In reply to Tomoya Tanjo from comment #0)
> It should throw an exception (not Error) or should be accepted.
As atilaneves and MoonlightSentinel pointed out in PR 7277, the error is
correct, because this is high likely a programmers error and not a user
mistake.
--
    
    
More information about the Digitalmars-d-bugs
mailing list