changeset 25730:5bf1d8a0bcf7

isequalwithequalnans.m: Add to legacy list of functions (bug #50113). * scripts/legacy/isequalwithequalnans.m: Script which directs users to function isequaln. * scripts/legacy/module.mk: Add isequalwithequalnans.m to build system.
author Rik <rik@octave.org>
date Thu, 02 Aug 2018 10:01:59 -0700
parents a0923a7878e3
children 64fabfc191d7
files scripts/legacy/isequalwithequalnans.m scripts/legacy/module.mk
diffstat 2 files changed, 41 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/legacy/isequalwithequalnans.m	Thu Aug 02 10:01:59 2018 -0700
@@ -0,0 +1,40 @@
+## Copyright (C) 2018 Rik Wehbring
+##
+## This file is part of Octave.
+##
+## Octave is free software: you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <https://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {} isequalwithequalnans (@var{x1}, @var{x2}, @dots{})
+## This function is obsolete.  Use @code{isequaln} instead.
+## @seealso{isequaln}
+## @end deftypefn
+
+## At one time, Matlab docs stated that this function is obsolete and would be
+## removed in some future version.  Now users are told that it should be
+## avoided, but there is no mention of possible future removal.
+
+function retval = isequalwithequalnans (varargin)
+
+  persistent warned = false;
+  if (! warned)
+    warned = true;
+    warning ("Octave:legacy-function",
+             "isequalwithequalnans is obsolete; please use isequaln instead");
+  endif
+
+  retval = isequaln (varargin{:});
+
+endfunction
--- a/scripts/legacy/module.mk	Thu Aug 02 09:39:44 2018 -0700
+++ b/scripts/legacy/module.mk	Thu Aug 02 10:01:59 2018 -0700
@@ -1,6 +1,7 @@
 FCN_FILE_DIRS += scripts/legacy
 
 %canon_reldir%_FCN_FILES = \
+  %reldir%/isequalwithequalnans.m \
   %reldir%/isstr.m \
   %reldir%/setstr.m