nargchk.m - obsolete(?) error message
John W. Eaton
jwe at octave.org
Fri May 15 10:48:37 CDT 2009
On 15-May-2009, Alois Schlögl wrote:
| Currently (Octave 3.1.55), the command nargchk fails if 4th input
| argument is 'struct' with the following error message:
|
|
| octave:26> nargchk(1, 3, nargin,'struct')
| error: nargchk: error does not yet support struct inputs
| error: called from:
| error: /usr/local/share/octave/3.1.55/m/general/nargchk.m at line 64,
| column 1
|
|
| As far as I understand it, the 4th input argument just says whether the
| output should be a struct or string. If I'm right, the error message is
| obsolete and the following patch should be applied.
I applied the patch since the error function no longer fails if the
argument is a struct. But it doesn't quite work right either. For
example, I see:
octave:1> nargchk (2, 4, 5, "struct")
ans =
{
message = too many input arguments
identifier = Octave:nargchk:too-many-inputs
}
octave:2> error (nargchk (2, 4, 5, "struct"))
error: unspecified error
but I think the call to error should print
error: too maany input arguments
instead of "unspecified error".
jwe
More information about the Bug-octave
mailing list