digitalmars.D.bugs - writef format bug
- nascent (3/3) Feb 20 2006 At least I believe this is a bug.
- Derek Parnell (13/18) Feb 20 2006 That is because '%c' is not a valid format specifier.
At least I believe this is a bug. writefln("%c", 's'); gives me a format exception.
Feb 20 2006
On Mon, 20 Feb 2006 20:10:28 -0800, nascent wrote:At least I believe this is a bug. writefln("%c", 's'); gives me a format exception.That is because '%c' is not a valid format specifier. See http://www.digitalmars.com/d/phobos/std_format.html for details. Use '%s' instead and it will format your character as a string. D's writefln is different to printf(). The format specifiers in D just tell D how you want it formatted, not what datatype you are supplying. It knows that already. -- Derek (skype: derek.j.parnell) Melbourne, Australia "Down with mediocracy!" 21/02/2006 3:32:16 PM
Feb 20 2006