diff src/data.cc @ 7576:7ebdc99a0bab

new isfloat function
author John W. Eaton <jwe@octave.org>
date Mon, 10 Mar 2008 22:24:49 -0400
parents f3c00dc0912b
children 3209a584e1ac
line wrap: on
line diff
--- a/src/data.cc
+++ b/src/data.cc
@@ -1870,6 +1870,22 @@
   return retval;
 }
 
+DEFUN (isfloat, args, ,
+  "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {} isfloat (@var{x})\n\
+Return true if @var{x} is a floating-point numeric object.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+  if (args.length () == 1)
+    retval = args(0).is_float_type ();
+  else
+    print_usage ();
+
+  return retval;
+}
+
 // FIXME -- perhaps this should be implemented with an
 // octave_value member function?