About std.stdio.File.writef
bearophile
bearophileHUGS at lycos.com
Fri Sep 3 19:28:53 PDT 2010
With dmd 2.048 this code:
import std.stdio: File;
void main() {
auto f = File("TEST.ppm", "w");
f.writef("%c", 50);
}
Prints at run-time:
std.format.FormatError: std.format integral
So to write a char I've had to use:
f.write(cast(char)50);
Partially unrelated: is is possible to perform something like f.readfln()? Do I have to use std.conv.parse for it?
Bye and thank you,
bearophile
More information about the Digitalmars-d-learn
mailing list