changeset 12797:71265f725b11

codesprint: Deprecate cut() function. * deprecated/module.mk, statistics/base/module.mk: Change Automake files to have cut.m in deprecated directory.
author Rik <octave@nomad.inbox5.com>
date Sat, 16 Jul 2011 10:22:59 -0700
parents 886256714823
children 6fdf4927fefc
files NEWS scripts/deprecated/cut.m scripts/deprecated/module.mk scripts/statistics/base/cut.m scripts/statistics/base/module.mk
diffstat 4 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS
+++ b/NEWS
@@ -30,6 +30,7 @@
     be removed from Octave 3.10 (or whatever version is the second major
     release after 3.6):
 
+      cut
       __error_text__
       error_text
       is_duplicate_entry
rename from scripts/statistics/base/cut.m
rename to scripts/deprecated/cut.m
--- a/scripts/statistics/base/cut.m
+++ b/scripts/deprecated/cut.m
@@ -37,6 +37,13 @@
 
 function group = cut (x, breaks)
 
+  persistent warned = false;
+  if (! warned)
+    warned = true;
+    warning ("Octave:deprecated-function",
+             "cut is obsolete and will be removed from a future version of Octave; please use histc instead");
+  endif
+
   if (nargin != 2)
     print_usage ();
   endif
--- a/scripts/deprecated/module.mk
+++ b/scripts/deprecated/module.mk
@@ -7,6 +7,7 @@
   deprecated/cellidx.m \
   deprecated/clg.m \
   deprecated/cquad.m \
+  deprecated/cut.m \
   deprecated/dispatch.m \
   deprecated/fstat.m \
   deprecated/gammai.m \
--- a/scripts/statistics/base/module.mk
+++ b/scripts/statistics/base/module.mk
@@ -6,7 +6,6 @@
   statistics/base/cor.m \
   statistics/base/corrcoef.m \
   statistics/base/cov.m \
-  statistics/base/cut.m \
   statistics/base/gls.m \
   statistics/base/histc.m \
   statistics/base/iqr.m \