www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - changing the output of `std.stdio.write'

reply Manfred Nowak <svv1999 hotmail.com> writes:
According to this tutorial
   https://wiki.dlang.org/Defining_custom_print_format_specifiers
it seems easy to change the format of the output for 
`std.stdio.writef'.

But why is there no example for changing the output when there 
are no format specifiers?

-manfred
Jan 03 2019
parent reply Paul Backus <snarwin gmail.com> writes:
On Thursday, 3 January 2019 at 17:59:28 UTC, Manfred Nowak wrote:
 According to this tutorial
   https://wiki.dlang.org/Defining_custom_print_format_specifiers
 it seems easy to change the format of the output for 
 `std.stdio.writef'.

 But why is there no example for changing the output when there 
 are no format specifiers?

 -manfred
According to the page you linked, functions that don't take any format specifiers, like `write` and `writeln`, default to `%s`.
Jan 03 2019
parent Manfred Nowak <svv1999 hotmail.com> writes:
On Thursday, 3 January 2019 at 18:11:43 UTC, Paul Backus wrote:
 [...] functions [...] default to `%s`.
thx. I should have rtfm instead of looking for an example. -manfred
Jan 03 2019