Mercurial > octave-nkf
diff src/data.cc @ 6223:a6cc01dd09f9
[project @ 2007-01-03 20:59:28 by jwe]
author | jwe |
---|---|
date | Wed, 03 Jan 2007 20:59:28 +0000 |
parents | c67c11e22828 |
children | 06bee64edc08 |
line wrap: on
line diff
--- a/src/data.cc Wed Jan 03 20:15:16 2007 +0000 +++ b/src/data.cc Wed Jan 03 20:59:28 2007 +0000 @@ -1239,6 +1239,25 @@ DEFALIAS (islogical, isbool); +DEFUN (isinteger, args, , + "-*- texinfo -*-\n\ +@deftypefn {Built-in Function} {} isreal (@var{x})\n\ +Return true if @var{x} is an integer object (int8, uint8, int16, etc.).\n\ +Note that @code{isinteger (14)} is false because numeric constants in\n\ +are double precision floating point values.\n\ +@seealso{isreal, isnumeric, class, isa}\n\ +@end deftypefn") +{ + octave_value retval; + + if (args.length () == 1) + retval = args(0).is_integer_type (); + else + print_usage (); + + return retval; +} + DEFUN (iscomplex, args, , "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} iscomplex (@var{x})\n\ @@ -1375,7 +1394,6 @@ return retval; } - DEFUN (isreal, args, , "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} isreal (@var{x})\n\