Issue 4450 - writefln throws unexpected runtime error
Summary: writefln throws unexpected runtime error
Status: RESOLVED INVALID
Alias: None
Product: D
Classification: Unclassified
Component: druntime (show other issues)
Version: D2
Hardware: x86 Windows
: P2 normal
Assignee: Sean Kelly
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-12 13:58 UTC by Roel
Modified: 2010-07-15 09:58 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Roel 2010-07-12 13:58:29 UTC
The following code compiles fine, but gives the following "std.format.FormatError: std.format integral" when ran.

  import std.stdio;
  void main() {
    writefln ("%i", 4);
  }

DMD v2.047

Regards,
Roel
Comment 1 Roel 2010-07-15 03:22:06 UTC
I see now on http://www.digitalmars.com/d/2.0/phobos/std_format.html#format-string that %i is not a valid formatting option.

The %i is mentioned in the TDPL book on page 5.
Comment 2 Andrei Alexandrescu 2010-07-15 09:58:53 UTC
I added the erratum: http://www.erdani.com/tdpl/errata/.