writefln on interface array
Ellery Newcomer
ellery-newcomer at utulsa.edu
Wed Apr 7 07:38:25 PDT 2010
On 04/07/2010 06:13 AM, strtr wrote:
> Is it possible to have this output [null,"1"] in stead of Error: std.format formatArg?
>
> interface I{}
> class C:I{
> int index;
> char[] toString(){ return toString(index) }
> }
>
> I[2] two_i;
> I[1] = new C();
> writefln(two_i);
>
>
>
> Would be handy for debugging ;)
>
s/interface I{}/interface I{ char[] toString(); }/
s/writefln(two_i)/writefln("%s",two_i)/
?
or see bug 535
More information about the Digitalmars-d-learn
mailing list