Multidimensional Box arrays
Myron Alexander
someone at not_an_email_address.com
Fri Feb 2 08:05:47 PST 2007
Hello.
I seem to have solved my problem. I'm not sure what I am doing differently but it seems to work now :)
----------
import std.stdio;
import std.boxer;
void main() {
writefln ("Boxing day");
Box[] a = boxArray(25, "Hello World", 1337);
Box[] b = boxArray("X", "Y", 42);
Box[][] ab = [a,b];
writefln ("%d, %s, %d", unbox!(int)(ab[0][0]), unbox!(char[])(ab[0][1]), unbox!(int)(ab[0][2]));
writefln ("%s, %s, %d", unbox!(char[])(ab[1][0]), unbox!(char[])(ab[1][1]), unbox!(int)(ab[1][2]));
}
----------
Regards,
Myron
More information about the Digitalmars-d-learn
mailing list