Mercurial > hg > octave-nkf
diff doc/interpreter/func.txi @ 13749:62d1f56b0be7
New nthargout function
* nthargout.m: New function.
* func.txi (Multiple Return Values): document nthargout.
* module.mk (general_FCN_FILES): Add nthargout.m
* help.cc (varargin, varargout): Cross-reference other arg functions.
* ov-user-fucn.cc (nargin, nargout, isargout): Ditto.
* NEWS (3.6): Mention this new file.
author | Jordi Gutiérrez Hermoso <jordigh@octave.org> |
---|---|
date | Tue, 25 Oct 2011 09:46:38 -0700 |
parents | f96b9b9f141b |
children | e36817e2ee60 |
line wrap: on
line diff
--- a/doc/interpreter/func.txi +++ b/doc/interpreter/func.txi @@ -289,6 +289,12 @@ dimensions, and it is often desirable to give the individual return values distinct names. +It is possible to use the @code{nthargout} function to obtain only some +of the return values or several at once in a cell array. @ref{Cell Array +Objects} + +@DOCSTRING(nthargout) + In addition to setting @code{nargin} each time a function is called, Octave also automatically initializes @code{nargout} to the number of values that are expected to be returned. This allows you to write