# HG changeset patch # User Ernst Reissner # Date 1471258011 -7200 # Node ID 18535a29a8e887b36767f9499417af4832091718 # Parent bc2a5db96754f625747cf3be36f2b57e0ac459f1 doc: improve documentation on oct-parse.in.yy(feval) (patch #9082) diff -r bc2a5db96754 -r 18535a29a8e8 doc/interpreter/contributors.in --- a/doc/interpreter/contributors.in Mon Aug 15 10:09:59 2016 +0200 +++ b/doc/interpreter/contributors.in Mon Aug 15 12:46:51 2016 +0200 @@ -274,6 +274,7 @@ Joshua Redstone Lukas Reichlin Michael Reifenberger +Ernst Reissner Jens Restemeier Anthony Richardson Jason Riedy diff -r bc2a5db96754 -r 18535a29a8e8 libinterp/parse-tree/oct-parse.in.yy --- a/libinterp/parse-tree/oct-parse.in.yy Mon Aug 15 10:09:59 2016 +0200 +++ b/libinterp/parse-tree/oct-parse.in.yy Mon Aug 15 12:46:51 2016 +0200 @@ -4765,11 +4765,16 @@ return retval; } -// Evaluate an Octave function (built-in or interpreted) and return -// the list of result values. NAME is the name of the function to -// call. ARGS are the arguments to the function. NARGOUT is the -// number of output arguments expected. - +/*! + Evaluate an Octave function (built-in or interpreted) and return + the list of result values. + + @param name the name of the function to call. + @param args the arguments to the function. + @param nargout the number of output arguments expected. + @return the list of output values with length @nargout, except + if the function is not defined. +*/ octave_value_list feval (const std::string& name, const octave_value_list& args, int nargout) { @@ -4778,7 +4783,9 @@ octave_value fcn = symbol_table::find_function (name, args); if (fcn.is_defined ()) - retval = fcn.do_multi_index_op (nargout, args); + { + retval = fcn.do_multi_index_op (nargout, args); + } else { try @@ -4811,13 +4818,16 @@ return args.slice (1, args.length () - 1, true); } - -// Evaluate an Octave function (built-in or interpreted) and return -// the list of result values. The first element of ARGS should be a -// string containing the name of the function to call, then the rest -// are the actual arguments to the function. NARGOUT is the number of -// output arguments expected. - +/*! + Evaluate an Octave function (built-in or interpreted) and return + the list of result values. + + @param args the first element of @c args should be a string + containing the name of the function to call, then the rest + are the actual arguments to the function. + @param nargout the number of output arguments expected. + @return the list of output values with length @nargout. +*/ octave_value_list feval (const octave_value_list& args, int nargout) {