From bug-request at octave dot org Tue Feb 1 16:49:42 2005 Subject: Re: strange error message From: Quentin Spencer To: "John W. Eaton" CC: Octave bugs list Date: Tue, 01 Feb 2005 16:52:27 -0600 John W. Eaton wrote: >Yes, this is a minor bug in the new N-d array indexing code. >The "XXX FIXME XXX" is there as a placeholder until someone decides >what to print there. I suppose "row" and "column" are still >acceptable for the first and second indices, but what should we print >for the others? Should we say > > error: invalid third index = 0 > >here? If so, we will have to convert from a number to "third". >Things like > > error: invalid index at position 3 (= 0) > >would be easier to code, but is it immediately obvious what is meant >by "position 3"? > >Suggestions? > > What about this: For dimension 3, print "third". For dimension N>3, print "Nth". This will produce correct "endings" on N for values up to 20 and have a relatively intuitive output. If anybody ever debugs a script that uses uses a 21-dimensional array (!), they will probably understand what is meant by "21th". -Quentin ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------