DMD 0.167 release
Serg Kovrov
kovrov at no.spam
Tue Sep 19 01:13:00 PDT 2006
I believe there are some issues with array literals right now, and I am
sure they will be fixed.
Meantime, how this array literals should be used? there is not much
example code in docs.
int[] i = [1, 2, 3];
or
int[] i = new [1, 2, 3];
or
int[] i = new int[1, 2, 3];
Can it be used with auto i = [1, 2, 3] ?
How about array of stings?like:
char[][] s = ["one", "two", "three"];
The only syntax i managed to compile is
int[] i = new int[1, 2, 3];
but when i try to print it it produces "[0,0,0]"
Definitely a bug. But before report bugs I'd like to know how it
actually should works.
--
serg.
More information about the Digitalmars-d-announce
mailing list