[Nickle] Re: Bug or misunderstanding
Barton C Massey
bart at cs.pdx.edu
Mon Nov 22 15:34:04 PST 2004
Bug. I know why it's there, but it violates the principle
of least surprise, as illustrated by your great surprise.
Will fix it when I get a moment's peace :-).
Bart
In message <Pine.GSO.4.58.0411221450550.24209 at algol.cs.pdx.edu> you wrote:
> 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