View mode: basic / threaded / horizontal-split · Log in · Help
November 08, 2012
[Issue 8981] New: bool and %s don't honor formating flags
http://d.puremagic.com/issues/show_bug.cgi?id=8981

          Summary: bool and %s don't honor formating flags
          Product: D
          Version: unspecified
         Platform: All
       OS/Version: All
           Status: NEW
         Severity: normal
         Priority: P2
        Component: Phobos
       AssignedTo: nobody@puremagic.com
       ReportedBy: monarchdodra@gmail.com


--- Comment #0 from monarchdodra@gmail.com 2012-11-08 07:34:10 PST ---
```D
import std.stdio;

void main()
{
   bool a = true;
   int b = 1;
   string c = "blaa";
   "bool %%s:   [%10s]".writefln(a);
   "bool %%d:   [%10d]".writefln(a);
   "int %%s:    [%10s]".writefln(b);
   "int %%d:    [%10d]".writefln(b);
   "string %%s: [%10s]".writefln(c);
}
```
Produces:
```
bool %s:   [true] // <-- Here
bool %d:   [         1]
int %s:    [         1]
int %d:    [         1]
string %s: [      blaa]
```

Which is a shame, because I needed to write an array of bools, with
"true"/"false", and alignment.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 03, 2013
[Issue 8981] bool and %s don't honor formating flags
http://d.puremagic.com/issues/show_bug.cgi?id=8981


Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

          What    |Removed                     |Added
----------------------------------------------------------------------------
            Status|NEW                         |RESOLVED
                CC|                            |andrej.mitrovich@gmail.com
        Resolution|                            |DUPLICATE


--- Comment #1 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-02-03 12:34:39 PST ---
Fixed in Issue 7142.

*** This issue has been marked as a duplicate of issue 7142 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Top | Discussion index | About this forum | D home