The format string. When passed as a compile-time argument, the string will be statically checked against the argument types passed.
Items to be read.
Same as formattedRead: the number of variables filled. If the input ends early, this number will be less that the number of variables provided.
// sum_rows.d void main() { import std.stdio; int a, b, c; while (readfln("%d %d %d", a, b, c) == 3) { writeln(a + b + c); } }
% cat << EOF > input 1 2 3 4 5 6 7 8 9 EOF % rdmd sum_rows.d < input 6 15 24
Reads a line from stdin and parses it using std.format.read.formattedRead.