From bug-request at octave dot org Tue Feb 1 15:59:09 2005 Subject: strange error message From: Francesco Potorti` To: Octave bugs list Date: Tue, 1 Feb 2005 15:47:31 -0600 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 error: evaluating argument list element number 1 error: evaluating binary operator `==' near line 8, column 38 error: evaluating argument list element number 1 error: evaluating postfix operator `'' near line 8, column 50 error: evaluating assignment expression near line 8, column 14 error: evaluating for command near line 7, column 5 error: evaluating for command near line 5, column 3 error: called from `baco' in file `/home/pot/math/workarea/baco.m' octave at pot:1> ===File ~/math/workarea/baco.m============================== function rit = baco () E = ones(2, 2, 2); for r = i:2; R = zeros(5,2); for n=1:5 R(n,:) = any(squeeze(E(r,:,:)) == n*ones(2,2))'; endfor endfor endfunction ============================================================ ------------------------------------------------------------- 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 -------------------------------------------------------------