comparison libinterp/octave.cc @ 18129:e473c4853afc gui-release

enable non-integer ranges as indices by default and deprecate preference * octave.cc (maximum_braindamage): Don't call Fdo_brainded_shortcircuit_evaluation. * error.cc (initialize_default_warning_state): Don't set Octave:noninteger-range-as-index to "error". * octave.cc (maximum_braindamage): Don't call Fallow_noninteger_range_as_index. Don't set Octave:noninteger-range-as-index to "on". * ov-range.h, ov-range.cc (Vallow_noninteger_range_as_index): Now static. Set default value to true. * ov.h (octave_value::index_vector): New arg, require_integers. * ov-base.cc, ov-base.h (octave_value::index_vector): Likewise. * ov-base-diag.cc, ov-base-diag.h, ov-bool-mat.h, ov-bool-sparse.h, ov-bool.h, ov-ch-mat.cc, ov-ch-mat.h, ov-class.cc, ov-class.h, ov-colon.h, ov-complex.h, ov-float.h, ov-flt-re-mat.h, ov-intx.h, ov-lazy-idx.h, ov-perm.cc, ov-perm.h, ov-range.cc, ov-range.h, ov-re-mat.h, ov-re-sparse.cc, ov-re-sparse.h, ov-scalar.h: Make corresponding changes in all derived methods. * ov-range.cc (octave_range::index_vector): If new require_integers argument is true, also require integer arguments regardless of the setting of Vallow_noninteger_range_as_index. * utils.cc (Fisindex): Don't temporarily set Vallow_noninteger_range_as_index. Call index_vector with argument of true. * NEWS: Mention change in default value, warning state and deprecated function.
author John W. Eaton <jwe@octave.org>
date Wed, 11 Dec 2013 23:35:34 -0500
parents 4a4897cd6da1
children c7b68a11074b ab26db8da20a
comparison
equal deleted inserted replaced
18128:4a4897cd6da1 18129:e473c4853afc
480 persist = true; 480 persist = true;
481 481
482 FPS1 (octave_value (">> ")); 482 FPS1 (octave_value (">> "));
483 FPS2 (octave_value ("")); 483 FPS2 (octave_value (""));
484 FPS4 (octave_value ("")); 484 FPS4 (octave_value (""));
485 Fallow_noninteger_range_as_index (octave_value (true));
486 Fbeep_on_error (octave_value (true)); 485 Fbeep_on_error (octave_value (true));
487 Fconfirm_recursive_rmdir (octave_value (false)); 486 Fconfirm_recursive_rmdir (octave_value (false));
488 Fcrash_dumps_octave_core (octave_value (false)); 487 Fcrash_dumps_octave_core (octave_value (false));
489 Fsave_default_options (octave_value ("-mat-binary")); 488 Fsave_default_options (octave_value ("-mat-binary"));
490 Ffixed_point_format (octave_value (true)); 489 Ffixed_point_format (octave_value (true));
495 disable_warning ("Octave:abbreviated-property-match"); 494 disable_warning ("Octave:abbreviated-property-match");
496 disable_warning ("Octave:fopen-file-in-path"); 495 disable_warning ("Octave:fopen-file-in-path");
497 disable_warning ("Octave:function-name-clash"); 496 disable_warning ("Octave:function-name-clash");
498 disable_warning ("Octave:load-file-in-path"); 497 disable_warning ("Octave:load-file-in-path");
499 disable_warning ("Octave:possible-matlab-short-circuit-operator"); 498 disable_warning ("Octave:possible-matlab-short-circuit-operator");
500
501 // Initialized to "error" by default.
502 set_warning_state ("Octave:noninteger-range-as-index", "on");
503 } 499 }
504 500
505 // EMBEDDED is declared int instead of bool because this function is 501 // EMBEDDED is declared int instead of bool because this function is
506 // declared extern "C". 502 // declared extern "C".
507 503