[Nickle] Bug or misunderstanding

Jeremy Greenwald jegreen at cs.pdx.edu
Mon Nov 22 14:55:59 PST 2004


	The following was taken from an interactive nickle session:
> int[5,3] twoarr;
> printf("%d %d\n",dims(twoarr)[0], dims(twoarr)[1]);
3 5
Same with the initializer
>     int [*,*] twoarr2 = ([5, 3]) { [i, j] = -1};
> printf("%d %d\n",dims(tworr)[0], dims(twoarr2)[1]);
3 5

Why is the size in the first dimension stored in the second element and
the size in the second dimension stored in the first element returned by
dims?  I would expect the numbers returned by dims to be in the same order
as they were in the declaration/initializer.

Gentlemen . . . Behold!



More information about the Nickle mailing list