Is this bug ? format %(%)

Paul Backus snarwin at gmail.com
Wed Apr 7 17:31:09 UTC 2021


On Wednesday, 7 April 2021 at 17:04:56 UTC, novice2 wrote:
> On Wednesday, 7 April 2021 at 13:43:18 UTC, Paul Backus wrote:
>> So, you should change your code to
>>
>>     writefln("%-(%s, %)", s);
>
> sorry i dont read docs so carefully
> thanks

It's not your fault--this is a pretty obscure feature, and it's 
not documented very well. Even after you've found the correct 
page in the documentation (the page for `formattedWrite` [1]), 
you have to scroll down past multiple examples to find the text 
that explains it.

[1] https://dlang.org/phobos/std_format.html#formattedWrite


More information about the Digitalmars-d-learn mailing list