changeset 25087:8f1ab6db6709 stable

doc: Improve docstring for function keyword (bug #53146) * op-kw-docs: Improve docstring for function keyword.
author Rik <rik@octave.org>
date Mon, 02 Apr 2018 11:31:11 -0700
parents 36f17567ffa1
children 56e888cd8298
files libinterp/op-kw-docs
diffstat 1 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/op-kw-docs	Fri Mar 23 10:52:50 2018 -0500
+++ b/libinterp/op-kw-docs	Mon Apr 02 11:31:11 2018 -0700
@@ -598,11 +598,17 @@
 function
 @c libinterp/parse-tree/oct-parse.in.yy
 -*- texinfo -*-
-@deftypefn  {} {} function @var{outputs} = function (@var{input}, @dots{})
-@deftypefnx {} {} function {} function (@var{input}, @dots{})
-@deftypefnx {} {} function @var{outputs} = function
-Begin a function body with @var{outputs} as results and @var{inputs} as
-parameters.
+@deftypefn  {} {} function @var{outputs} = function_name (@var{input}, @dots{})
+@deftypefnx {} {} function {} function_name (@var{input}, @dots{})
+@deftypefnx {} {} function @var{outputs} = function_name
+Begin a function body with name @code{function_name}, with @var{outputs} as
+results, and with @var{inputs} as parameters.  The function can later be
+invoked in Octave using the syntax
+
+@example
+[@var{output1}, @var{output2}, @dots{}] = function_name (@var{input1}, @var{input2}, @dots{})
+@end example
+
 @seealso{return}
 @end deftypefn
 global