Mercurial > hg > octave-nkf
changeset 5550:815926a781f6
[project @ 2005-11-30 03:22:53 by jwe]
author | jwe |
---|---|
date | Wed, 30 Nov 2005 03:22:53 +0000 |
parents | 6db3a5df1eab |
children | 71cfd8fedd5d |
files | scripts/general/__isequal__.m scripts/general/isequal.m scripts/general/isequalwithequalnans.m |
diffstat | 3 files changed, 17 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/general/__isequal__.m +++ b/scripts/general/__isequal__.m @@ -15,9 +15,8 @@ ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ## -*- texinfo -*- -## @deftypefn {Function File} {} __isequal__ (@var{nans_compare_equal}, -## @var{x1}, @var{x2}, ...) -## Return true if @var{x1}, @var{x2}, ... are all equal and +## @deftypefn {Function File} {} __isequal__ (@var{nans_compare_equal}, @var{x1}, @var{x2}, @dots{}) +## Return true if @var{x1}, @var{x2}, @dots{} are all equal and ## @var{nans_compare_equal} evaluates to false. ## ## If @var{nans_compare_equal} evaluates to true, then assume NaN == NaN.
--- a/scripts/general/isequal.m +++ b/scripts/general/isequal.m @@ -17,19 +17,19 @@ ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ## -*- texinfo -*- -## @deftypefn {Function File} {} isequal (@var{x1}, @var{x2}, ...) -## Return true if all of @var{x1}, @var{x2}, ... are equal. +## @deftypefn {Function File} {} isequal (@var{x1}, @var{x2}, @dots{}) +## Return true if all of @var{x1}, @var{x2}, @dots{} are equal. ## @end deftypefn ## ## @seealso{isequalwithequalnans} -function tf = isequal (x, varargin) +function retval = isequal (x, varargin) - if (nargin < 2) + if (nargin > 1) + retval = __isequal__ (0, x, varargin{:}); + else usage ("isequal (x1, x2, ...)"); - end - - tf = __isequal__ (0, x, varargin{:}); + endif endfunction
--- a/scripts/general/isequalwithequalnans.m +++ b/scripts/general/isequalwithequalnans.m @@ -17,19 +17,20 @@ ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ## -*- texinfo -*- -## @deftypefn {Function File} {} isequalwithequalnans (@var{x1}, @var{x2}, ...) -## Assuming NaN == NaN, return true if all of @var{x1}, @var{x2}, ... are equal. +## @deftypefn {Function File} {} isequalwithequalnans (@var{x1}, @var{x2}, @dots{}) +## Assuming NaN == NaN, return true if all of @var{x1}, @var{x2}, @dots{} +## are equal. ## @end deftypefn ## ## @seealso{isequal} -function tf = isequalwithequalnans (x, varargin) +function retval = isequalwithequalnans (x, varargin) - if (nargin < 2) + if (nargin > 1) + retval = __isequal__ (1, x, varargin{:}); + else usage ("isequalwithequalnans (x1, x2, ...)"); - end - - tf = __isequal__ (1, x, varargin{:}); + endif endfunction