www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15227] New: std.format undocumented grammar

https://issues.dlang.org/show_bug.cgi?id=15227

          Issue ID: 15227
           Summary: std.format undocumented grammar
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: trivial
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: Tachyon165 gmail.com

I don't see anywhere in the documentation of std.format including the grammar
of a format specifier for the following that appears to be implemented around
line 1000:
- positional argument of the forms %m:n$ and %m:$
- digits and '$' following a '*' for positional width
- digits and '$' following '.*' for positional precision

Further, while the documentation for arrays (compound format) and the various
output is pretty good, I don't see many examples of the other sorts of formats.
 There does appear to be many undocumented unit tests scattered throughout the
6700 line module, so maybe some of them can be used.  Particularly, there
appears to be a fairly comprehensive one at line 6226.

I suppose a certain familiarity with printf may be assumed here, but of course,
this isn't exactly printf.

--
Oct 19 2015