# HG changeset patch # User John W. Eaton # Date 1345834015 14400 # Node ID fbecbce4589835d7e6bd6e96f036bf97be2c6470 # Parent a0af93de0ba3f2d0ccb7beb60cd76768d68aba92 also return help text as a string when nargin = 0 (bug #37183) * help.m: Return help text if nargin == 0 && nargout != 0. diff -r a0af93de0ba3 -r fbecbce45898 scripts/help/help.m --- a/scripts/help/help.m Fri Aug 24 11:45:50 2012 -0400 +++ b/scripts/help/help.m Fri Aug 24 14:46:55 2012 -0400 @@ -44,7 +44,7 @@ if (nargin == 0) - puts ("\n\ + text = "\n\ For help with individual commands and functions type\n\ \n\ help NAME\n\ @@ -58,7 +58,13 @@ doc\n\ \n\ GNU Octave is supported and developed by its user community.\n\ - For more information visit http://www.octave.org.\n\n"); + For more information visit http://www.octave.org.\n\n"; + + if (nargout == 0) + puts (text); + else + retval = text; + endif elseif (nargin == 1 && ischar (name))