Mercurial > hg > octave-terminal
changeset 12897:503865c2e542
strfns.cc: Return empty string in strvcat if called sans arguments (bug #33533)
author | Jordi Gutiérrez Hermoso <jordigh@gmail.com> |
---|---|
date | Wed, 27 Jul 2011 18:47:13 -0500 |
parents | 8edece28cf4d |
children | 0ca8f06aba7a |
files | src/strfns.cc |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/strfns.cc +++ b/src/strfns.cc @@ -170,6 +170,7 @@ @deftypefnx {Built-in Function} {} strvcat (@var{x}, @dots{})\n\ @deftypefnx {Built-in Function} {} strvcat (@var{s1}, @var{s2}, @dots{})\n\ @deftypefnx {Built-in Function} {} strvcat (@var{cell_array})\n\ +@deftypefnx {Built-in Function} {} strvcat ()\n\ Create a character array from one or more numeric matrices, character\n\ matrices, or cell arrays. Arguments are concatenated vertically.\n\ The returned values are padded with blanks as needed to make each row\n\ @@ -196,6 +197,9 @@ \"half \"]\n\ @end group\n\ @end example\n\ +\n\ +For compatibility with @sc{Matlab}, calling @code{strvcat} without arguments\n\ +returns the empty string.\n\ @seealso{char, strcat, cstrcat}\n\ @end deftypefn") { @@ -273,7 +277,7 @@ retval = octave_value (result, '\''); } else - print_usage (); + retval = octave_value (""); return retval; }