Bug 7620 – format has different output compared to writef

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-03-01T09:58:00Z
Last change time
2012-04-01T15:06:00Z
Assigned to
nobody
Creator
andrej.mitrovich

Comments

Comment #0 by andrej.mitrovich — 2012-03-01T09:58:29Z
import std.string; import std.stdio; enum Foo { foo, bar } void main() { Foo foo; writefln("%s", foo); writeln(format("%s", foo)); } Prints: foo 0 I really think these two should be in sync with each other. It's hard to switch from writef debugging to log-based debugging when writef does one thing and format() does another.
Comment #1 by bearophile_hugs — 2012-03-01T10:09:16Z
See also issue 7571
Comment #2 by smjg — 2012-04-01T15:06:00Z
*** This issue has been marked as a duplicate of issue 4532 ***