On 6/11/22 00:09, z wrote:
> I rechecked and it should be `X Y Z` for static array, but `Z Y X` for
> indexing/dynamic array creating with `new`
How so? I wrote the following program:
import std.stdio;
void main() {
enum X = 2;
enum Y = 3;
enum Z = 4;
int[X][Y][Z] s;
int[X][Y][] d = new int[X][Y][Z];
pragma(msg, typeof(s));
pragma(msg, typeof(d));
}
It outputs the following for the static and the dynamic arrays:
int[2][3][4]
int[2][3][]
Consistent elements, except the static array has a compile-time known
length.
Ali