[Issue 8981] New: bool and %s don't honor formating flags
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Nov 8 07:34:10 PST 2012
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 at puremagic.com
ReportedBy: monarchdodra at gmail.com
--- Comment #0 from monarchdodra at 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: -------
More information about the Digitalmars-d-bugs
mailing list