www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - About std.stdio.File.writef

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:

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,
Sep 03 2010