February 03, 2005 std.stdio.writeln (without percent voodoo) | ||||
---|---|---|---|---|
| ||||
Attachments: | Just as I suspected, it was trivial to hack
another parameter onto std.format.doFormat,
to optionally make it ignore any percentages.
And then it's not that hard to implement
std.stdio.write and std.stdio.writeln,
which work the same - but without "format"!
> import std.stdio;
>
> void main()
> {
> writef("*** Hall\u00e5, ");
> writefln("V\u00e4rlden! ***");
> write("%%% Hall\u00e5, ");
> writeln("V\u00e4rlden! %%%");
>
> writefln("%d%%",100);
> writeln(100,"%");
> }
Full patch against DMD 0.112 is attached.
Tested with GDC 0.10, without problems...
(well, except the usual line-ending ones)
--anders
|
Copyright © 1999-2021 by the D Language Foundation