writef %d of string

bearophile bearophileHUGS at lycos.com
Wed Oct 12 15:41:54 PDT 2011


This code, that a sane language/language implementation refuses at compile-time, runs:


import std.stdio;
void main() {
    writefln("%d", "hello");
}


And it outputs:
['h', 'e', 'l', 'l', 'o']

Is this good/expected/acceptable/buggy?

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list