digitalmars.D.bugs - 0.97 the info code for classes still wrong
- Ant (20/20) Jul 28 2004 you didn't fix it yet...
- Jarrett Billingsley (14/14) Jul 29 2004 ummmmm..
- Ant (17/18) Jul 29 2004 http://www.digitalmars.com/d/std_format.html#format-string
- Jarrett Billingsley (1/1) Aug 02 2004 ooh.
you didn't fix it yet... this prevents me from using the new writef... :( private import std.stdio; class A { char[] toString() { return "There"; } } void main() { writefln("Hello %d a=%s", 1, new A); } $ dmd Write.d -I~/dmd/src/phobos gcc Write.o -o Write -lphobos -lpthread -lm $ Write Hello 1 a=-4611693542134431776 Ant
Jul 28 2004
ummmmm.. private import std.stdio; class A { char[] toString() { return "There"; } } void main() { writefln("Hello %d a=%s", 1, (new A).toString()); } is D supposed to support implicit conversions from objects to char[]?
Jul 29 2004
On Fri, 30 Jul 2004 01:06:44 -0400, Jarrett Billingsley wrote:is D supposed to support implicit conversions from objects to char[]?http://www.digitalmars.com/d/std_format.html#format-string FormatChar 's' The corresponding argument is formatted in a manner consistent with its type: bit The result is 'true' or 'false'. integral types The %d format is used. floating point types The %g format is used. string types The result is the string converted to UTF-8. A Precision specifies the maximum number of characters to use in the result. classes derived from Object The result is the string returned from the class instance's .toString() method. A Precision specifies the maximum number of characters to use in the result.
Jul 29 2004