the best language I have ever met(?)
Igor Shirkalin via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Nov 19 13:22:25 PST 2016
On Saturday, 19 November 2016 at 20:54:32 UTC, ketmar wrote:
> On Saturday, 19 November 2016 at 17:12:13 UTC, Igor Shirkalin
> wrote:
>>> string s = "%(%s, %)".format(a);
>>> writefln(s);
>>> }
>>
>> Accepted.
>> Is it really needed to call 'writefln'? I mean 'f'.
>
> no. it's a leftover from the code without format. it originally
> was `writefln("%(%s, %)", a);`, but i wanted to show `format`
> function too, and forgot to remove `f`. actually, it is a BUG
> to call `writefln` here, 'cause who knows, `s` may contain '%',
> and then boom! all hell broke loose. ;-)
Got it! Thanks.
More information about the Digitalmars-d-learn
mailing list