Mercurial > octave-nkf
diff libinterp/corefcn/error.cc @ 18125:25e87795f437 stable
don't error for non-integer ranges used as indices if --traditional
* octave.cc (maximum_braindamage): Set warning state
Octave:noninteger-range-as-index to "on".
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 11 Dec 2013 22:21:06 -0500 |
parents | 175b392e91fe |
children | 4a4897cd6da1 1213af866a89 |
line wrap: on
line diff
--- a/libinterp/corefcn/error.cc Tue Dec 10 18:04:17 2013 -0500 +++ b/libinterp/corefcn/error.cc Wed Dec 11 22:21:06 2013 -0500 @@ -1638,12 +1638,7 @@ disable_warning ("Octave:variable-switch-label"); // This should be an error unless we are in maximum braindamage mode. - // FIXME: Not quite right. This sets the error state even for braindamage - // mode. Also, this error is not triggered in normal mode because another - // error handler catches it first and gives: - // error: subscript indices must be either positive integers or logicals set_warning_state ("Octave:noninteger-range-as-index", "error"); - } DEFUN (lasterror, args, ,