comparison examples/paramdemo.cc @ 12254:23385f2c90b7 release-3-4-x

whitespace fixes
author John W. Eaton <jwe@octave.org>
date Wed, 26 Jan 2011 23:49:42 -0500
parents 6cb30a539481
children 460a3c6d8bf1
comparison
equal deleted inserted replaced
12253:1f14586af94c 12254:23385f2c90b7
1 #include <octave/oct.h> 1 #include <octave/oct.h>
2 2
3 DEFUN_DLD (paramdemo, args, nargout, 3 DEFUN_DLD (paramdemo, args, nargout,
4 "Parameter Check Demo.") 4 "Parameter Check Demo.")
5 { 5 {
6 int nargin = args.length (); 6 int nargin = args.length ();
7 octave_value retval; 7 octave_value retval;
8 8
19 if (m.any_element_is_negative ()) 19 if (m.any_element_is_negative ())
20 octave_stdout << " includes negative values\n"; 20 octave_stdout << " includes negative values\n";
21 if (m.any_element_is_inf_or_nan()) 21 if (m.any_element_is_inf_or_nan())
22 octave_stdout << " includes Inf or NaN values\n"; 22 octave_stdout << " includes Inf or NaN values\n";
23 if (m.any_element_not_one_or_zero()) 23 if (m.any_element_not_one_or_zero())
24 octave_stdout << 24 octave_stdout <<
25 " includes other values than 1 and 0\n"; 25 " includes other values than 1 and 0\n";
26 if (m.all_elements_are_int_or_inf_or_nan()) 26 if (m.all_elements_are_int_or_inf_or_nan())
27 octave_stdout << 27 octave_stdout <<
28 " includes only int, Inf or NaN values\n"; 28 " includes only int, Inf or NaN values\n";
29 if (m.all_integers (min_val, max_val)) 29 if (m.all_integers (min_val, max_val))
30 octave_stdout << 30 octave_stdout <<
31 " includes only integers in [-10,10]\n"; 31 " includes only integers in [-10,10]\n";
32 } 32 }
33 return retval; 33 return retval;
34 } 34 }