From bug-request at octave dot org Tue Feb 1 16:06:59 2005 Subject: strange error message From: "John W. Eaton" To: Francesco Potorti` Cc: Octave bugs list Date: Tue, 1 Feb 2005 16:04:07 -0600 On 1-Feb-2005, Francesco Potorti` wrote: | I wrote a bugged function, appended below. The bug is in the for | instruction, where I wrote "i" instead of "1". | | The strange thing is that I get this error message, which I suspect | exposes a bug. | | pot at pot:~/math/workarea$ octave --no-line-editing | GNU Octave, version 2.1.64 (i386-pc-linux-gnu). | Copyright (C) 2004 John W. Eaton. | This is free software; see the source code for copying conditions. | There is ABSOLUTELY NO WARRANTY; not even for MERCHANTIBILITY or | FITNESS FOR A PARTICULAR PURPOSE. For details, type `warranty'. | | Additional information about Octave is available at http://www.octave.org. | | Please contribute if you find this software useful. | For more information, visit http://www.octave.org/help-wanted.html | | Report bugs to (but first, please read | http://www.octave.org/bugs.html to learn how to write a helpful report). | | octave at pot:1> baco() | error: invalid XXX FIXME XXX index = 0 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? Thanks, jwe ------------------------------------------------------------- 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 -------------------------------------------------------------