[Issue 6892] Formatted write with specified length of enum member

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Apr 22 17:54:44 PDT 2012


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



--- Comment #7 from Kenji Hara <k.hara.pg at gmail.com> 2012-04-22 17:55:41 PDT ---
(In reply to comment #6)
> The problem at comment 5 can be reduced to this:
> 
> import std.stdio;
> 
> void main()
> {
>     writefln("%f", 42); // COMPILATION ERROR
> }
> 
> It looks like an integral cannot be matched to a floating point format
> specifier. (The same problem with "%g", etc.)
> 
> I have mixed feelings about this. Although 42 is definitely not a floating
> point type, it is implicitly converted to one according to language rules.

This is not allowed in current std.format implementation.

Original issue was already fixed, so I'll close this issue. If you think
integer value should be formatted with "%f", please open new enhancement
request.

-- 
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