Mercurial > hg > octave-max
diff scripts/general/nargoutchk.m @ 11470:eb9e0b597d61
Use common names for variables in documentation and code for a few more m-script files.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sun, 09 Jan 2011 13:44:15 -0800 |
parents | be55736a0783 |
children | fd0a3ac60b0e |
line wrap: on
line diff
--- a/scripts/general/nargoutchk.m +++ b/scripts/general/nargoutchk.m @@ -30,25 +30,25 @@ ## Author: Bill Denney <bill@denney.ws> -function msg = nargoutchk (mina, maxa, narg, outtype) +function msg = nargoutchk (minargs, maxargs, nargs, outtype) if (nargin < 3 || nargin > 4) print_usage (); - elseif (mina > maxa) - error ("nargoutchk: minargs must be <= maxargs"); + elseif (minargs > maxargs) + error ("nargoutchk: MINARGS must be <= MAXARGS"); elseif (nargin == 3) outtype = "string"; elseif (! any (strcmpi (outtype, {"string" "struct"}))) error ("nargoutchk: output type must be either string or struct"); - elseif (! (isscalar (mina) && isscalar (maxa) && isscalar (narg))) - error ("nargoutchk: mina, maxa, and narg must be scalars"); + elseif (! (isscalar (minargs) && isscalar (maxargs) && isscalar (nargs))) + error ("nargoutchk: MINARGS, MAXARGS, and NARGS must be scalars"); endif msg = struct ("message", "", "identifier", ""); - if (narg < mina) + if (nargs < minargs) msg.message = "not enough output arguments"; msg.identifier = "Octave:nargoutchk:not-enough-outputs"; - elseif (narg > maxa) + elseif (nargs > maxargs) msg.message = "too many output arguments"; msg.identifier = "Octave:nargoutchk:too-many-outputs"; endif