Mercurial > hg > octave-terminal
changeset 12718:01980844dc9c stable
colon.m: Stop issuing error if called accidentally with no arguments.
* colon.m: Check nargin != 0 before issuing error.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Wed, 08 Jun 2011 10:41:40 -0700 |
parents | a87052630372 |
children | 7b5bfd6a8e28 |
files | scripts/general/colon.m |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/general/colon.m +++ b/scripts/general/colon.m @@ -34,5 +34,7 @@ ## @end deftypefn function r = colon (varargin) - error ("colon: not defined for class \"%s\"", class(varargin{1})); + if (nargin != 0) + error ("colon: not defined for class \"%s\"", class(varargin{1})); + endif endfunction