std.stdio.write, writeln, fwrite, fwriteln

Anders F Björklund afb at algonet.se
Thu Dec 28 11:33:33 PST 2006


Lionello Lunesu wrote:

> I like writefln, but many times it's doing too much. I often forget to print
> strings explicitly using "%s", to prevent errors in the (rare) case the
> string contains %-characters. That's why I've added write, writeln, fwrite,
> fwriteln to std\stdio.d

I hope that you have better luck with your patch than I did with mine...

http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D&artnum=15627

> Attached the changed files from DMD 0.178 (including ddoc). (I have no idea
> what flags to pass to diff to get the usual diff output; do tell)

diff -u

> Because the signature of doFormat and writefx has changed, you'll have
> linker errors when linking to old obj/libs. Since we're <1.0 I thought it
> would not be a problem. If it is, I'll have to make new functions doFormat2,
> writefx2 (or so) and make the old doFormat, writefx call those new
> functions.

I hope so. Secretly I also hope that readf / unFormat will make it too ?

(see http://www.digitalmars.com/d/archives/digitalmars/D/21692.html)

--anders



More information about the Digitalmars-d-announce mailing list