# HG changeset patch # User Jordi GutiƩrrez Hermoso # Date 1311810433 18000 # Node ID 503865c2e542ae1b37b2be715d4d36346436b7a8 # Parent 8edece28cf4da09ac8eb89db6a22f5b1de8b4f2a strfns.cc: Return empty string in strvcat if called sans arguments (bug #33533) diff --git a/src/strfns.cc b/src/strfns.cc --- 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; }