Mercurial > hg > octave-nkf
diff src/octave.cc @ 10613:e103fb2182ce
use internal variable instead of warning state to control whether to allow non-integer ranges as indices
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 07 May 2010 15:58:51 -0400 |
parents | 1834132fb50b |
children | f5dbac015606 |
line wrap: on
line diff
--- a/src/octave.cc +++ b/src/octave.cc @@ -59,12 +59,13 @@ #include "oct-map.h" #include "oct-obj.h" #include "ops.h" +#include "ov.h" +#include "ov-range.h" #include "toplev.h" #include "parse.h" #include "procstream.h" #include "sighandlers.h" #include "sysdep.h" -#include "ov.h" #include "unwind-prot.h" #include "utils.h" #include "variables.h" @@ -563,6 +564,7 @@ bind_internal_variable ("PS1", ">> "); bind_internal_variable ("PS2", ""); + bind_internal_variable ("allow_noninteger_range_as_index", true); bind_internal_variable ("beep_on_error", true); bind_internal_variable ("confirm_recursive_rmdir", false); bind_internal_variable ("crash_dumps_octave_core", false); @@ -573,8 +575,6 @@ bind_internal_variable ("page_screen_output", false); bind_internal_variable ("print_empty_dimensions", false); - set_warning_state ("Octave:allow-noninteger-ranges-as-indices", "on"); - disable_warning ("Octave:abbreviated-property-match"); disable_warning ("Octave:fopen-file-in-path"); disable_warning ("Octave:function-name-clash");