http://d.puremagic.com/issues/show_bug.cgi?id=8531
Kenji Hara <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID --- Comment #2 from Kenji Hara <[email protected]> 2012-10-27 09:26:22 PDT --- (In reply to comment #1) > Actually, I think %u is redundant. std.format uses compile-time introspection > to do the "right thing" for %d. You can pass an unsigned number for %d and it > works correctly. I just tested %u, it seems that it's just an alias for %d: > > int a = -10; > writefln("%u", a); // outputs "-10" > > So I think this bug is invalid. Yes. And, if programmer really want to format int value as unsigned, he needs to use cast instead of %u. writefln("%d", cast(uint)a); // outputs "4294967286" -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
