diff NEWS @ 27517:85ad4689aa05

Add warning when non-scalar argument presented to ':' range operator. * NEWS: Announce new warning IDs Octave:colon-nonscalar-argument, Octave:colon-complex-argument. * basics.txi: Document that warning Octave:colon-nonscalar-argument is turned off when --traditional mode is used. * interpreter.cc (interpreter::maximum_braindamage): Disable Octave:colon-nonscalar-argument when --traditional used. * ov.cc (do_colon_op): Check that numel() == 1 for base, limit, and increment, or call warning_with_id. Change warning() to warning_with_id call for Octave:colon-complex-argument. * warning_ids.m: Document new warning IDs Octave:colon-nonscalar-argument, Octave:colon-complex-argument. * edit.m (default_user): Fix code that emitted a colon warning.
author Rik <rik@octave.org>
date Wed, 16 Oct 2019 13:49:19 -0700
parents bea2823affa4
children 37f9eb2c05e0
line wrap: on
line diff
--- a/NEWS	Wed Oct 16 13:35:08 2019 -0400
+++ b/NEWS	Wed Oct 16 13:49:19 2019 -0700
@@ -24,6 +24,12 @@
   'A-F' instead.  The previous uppercase formats, `E` and `G`, no longer
   control the case of the output.
 
+- New warnings have been added about questionable uses of the colon ':'
+  range operator.  Each has a new warning ID so that it can be disabled
+  if desired.
+    Octave:colon-complex-argument   : when any arg is complex
+    Octave:colon-nonscalar-argument : when any arg is non-scalar
+  
 #### Graphics backend
 
 - Graphic primitives now accept a color property value of `"none"`