IK:

Question: how to read that grid from a text file?

I don't know the cause of your problem. While investigating it I have filed another bug:
http://d.puremagic.com/issues/show_bug.cgi?id=8260


In the meantime this (a bit scary) code solves your reading problem:

import std.stdio, std.algorithm, std.range, std.conv;

void main() {
    const grid = File("table.txt")
                 .byLine().map!(r => std.algorithm.splitter(r)
                                     .map!(to!int)()
                                     .array())()
                 .array();
    writeln(grid);
}


Bye,
bearophile

Reply via email to