Fix by adding "bool parse" argument to doFormat; Adds write,writeln,fwrite,fwriteln
text/plain
4140
Comments
Comment #0 by lio+bugzilla — 2006-12-28T14:22:09Z
#import std.stdio;
#void main() {
# const char[][] x = ["%s","123"];
# writefln(x);
#}
C:\dmd>dmd -run bug
[Error: std.format
This happens because doFormat is called recursively, once for each of the
elements of the array. This means that there should never be any parsing for
string elements, since there'll never be any 2nd argument to be formatted.
A possible fix (+patch) can be found at:
http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.announce&article_id=6505
"Because the new doFormat takes the extra "bool parse" parameter, the fix is
simple: invoke doFormat with parse set to false."
Comment #1 by lio+bugzilla — 2006-12-28T14:23:38Z
Created attachment 85
Fix by adding "bool parse" argument to doFormat; Adds write,writeln,fwrite,fwriteln
Comment #2 by bruno.do.medeiros+deebugz — 2006-12-28T18:05:38Z