Mercurial > hg > octave-lyh
changeset 7772:ff717f2f9feb
Treat numeric and float argument in the isa function.
author | David Bateman <dbateman@free.fr> |
---|---|
date | Mon, 12 May 2008 22:39:33 +0200 |
parents | 680631e787aa |
children | f83be206eca1 |
files | scripts/ChangeLog scripts/general/isa.m |
diffstat | 2 files changed, 14 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,5 +1,8 @@ 2008-05-12 David Bateman <dbateman@free.fr> + * general/isa.m: Also treat "float: and "numeric" as the class + argument. + * general/dblquad.m, general/quadgk.m, general/quadv.m, general/triplequad.m: New functions.
--- a/scripts/general/isa.m +++ b/scripts/general/isa.m @@ -30,6 +30,15 @@ print_usage (); endif - retval = strcmp (class (x), cname); - + if (strcmp (cname, "float")) + retval = (strcmp (class (x), "double") || strcmp (class (x), "single")); + elseif (strcmp (cname, "fnumeric")) + retval = (strcmp (class (x), "double") || strcmp (class (x), "single") || + strcmp (class (x), "uint8") || strcmp (class (x), "uint16") || + strcmp (class (x), "uint32") || strcmp (class (x), "uint64") || + strcmp (class (x), "int8") || strcmp (class (x), "int16") || + strcmp (class (x), "int32") || strcmp (class (x), "int64")); + else + retval = strcmp (class (x), cname); + endif endfunction