[Issue 927] writefln() is duplicating values for parameters supplied

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Feb 3 10:55:15 PST 2007


http://d.puremagic.com/issues/show_bug.cgi?id=927





------- Comment #1 from rmann-d-lang at latencyzero.com  2007-02-03 12:55 -------
It seems that the first %s is converting the value of the last parameter. This
code

                char[] str = FourCharCodeAsString(MakeFourCharCode!("abcd"));
                char[] str1 = FourCharCodeAsString(MakeFourCharCode!("defg"));
                writefln("SketchViewClickHandler called. Class: '%s', Kind: %s
('%s')",
                                str,
                                eventKind,
                                str1);

Produces this output:

SketchViewClickHandler called. Class: 'defg', Kind: 3 ('defg')




This, however, works as expected:

                writefln("SketchViewClickHandler called. Class: '%s', Kind: %s
('%s')",
                                "abcd",
                                eventKind,
                                "efgh");


-- 



More information about the Digitalmars-d-bugs mailing list