Why I (Still) Won't Use D

e-t172 e-t172 at akegroup.org
Thu Mar 27 10:44:58 PDT 2008


Benji Smith a écrit :
>   // Doesn't compile
>   char[][] words = [ "hello", "world" ];

Yes it does:

---
module aainit;

import tango.io.Console;

void main()
{
         char[][] words = [ "hello", "world" ];

         foreach (word; words)
                 Cerr(word).newline;
}
---

$ gdc -o aainit aainit.d
$ ./aainit
hello
world

With D 1.0, GDC r199.



More information about the Digitalmars-d mailing list