[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: patches to script files on argument checking
From: |
John W. Eaton |
Subject: |
Re: patches to script files on argument checking |
Date: |
Sun, 04 Nov 2007 10:07:05 -0500 |
On 3-Nov-2007, Muthiah Annamalai wrote:
| Patch is attached.
|
| The changelog entry will be,
|
| 2007-11-03 Muthiah Annamalai <address@hidden>
|
| * general/isa.m, geometry/inpolygon.m, quaternion/, signal/,
| control/, and sparse/: Fix argument checking.
You need to list the files individually.
| Index: control/base/bode_bounds.m
| ===================================================================
| RCS file: /cvs/octave/scripts/control/base/bode_bounds.m,v
| retrieving revision 1.8
| diff -u -p -r1.8 bode_bounds.m
| --- control/base/bode_bounds.m 12 Oct 2007 21:27:17 -0000 1.8
| +++ control/base/bode_bounds.m 3 Nov 2007 21:47:03 -0000
| @@ -35,7 +35,9 @@
| ## @end deftypefn
|
| function [wmin, wmax] = bode_bounds (zer, pol, DIGITAL, tsam)
| -
| +
| + if ( nargin != 4 ), print_usage(); endif
| +
If you want this patch to be considered, you will need to follow the
coding conventions of Octave, so the above should be written
if (nargin != 4)
print_usage ();
endif
But I don't think I can apply this patch as it is anyway,
because it seems that every case is just
if (nargin != X)
where X is the number of function parameters. In many cases, Octave
function parameters have default values set, so they can accept fewer
arguments. Have you verified that none of the functions you have
modified can accept fewer arguments than are listed in the parameter
list?
jwe