Functions |
| DEFINE_OCTAVE_ALLOCATOR (octave_user_script) |
| DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_user_script,"user-defined script","user-defined script") |
| DEFINE_OCTAVE_ALLOCATOR (octave_user_function) |
| DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_user_function,"user-defined function","user-defined function") |
| DEFUN (nargin, args,,"-*- texinfo -*-\n\
@deftypefn {Built-in Function} {} nargin ()\n\
@deftypefnx {Built-in Function} {} nargin (@var{fcn_name})\n\
Within a function, return the number of arguments passed to the function.\n\
At the top level, return the number of command line arguments passed to\n\
Octave. If called with the optional argument @var{fcn_name}, return the\n\
maximum number of arguments the named function can accept, or -1 if the\n\
function accepts a variable number of arguments.\n\
@seealso{nargout, varargin, varargout}\n\
@end deftypefn") |
| DEFUN (nargout, args,,"-*- texinfo -*-\n\
@deftypefn {Built-in Function} {} nargout ()\n\
@deftypefnx {Built-in Function} {} nargout (@var{fcn_name})\n\
Within a function, return the number of values the caller expects to\n\
receive. If called with the optional argument @var{fcn_name}, return the\n\
maximum number of values the named function can produce, or -1 if the\n\
function can produce a variable number of values.\n\
\n\
For example,\n\
\n\
@example\n\
f ()\n\
@end example\n\
\n\
@noindent\n\
will cause @code{nargout} to return 0 inside the function @code{f} and\n\
\n\
@example\n\
[s, t] = f ()\n\
@end example\n\
\n\
@noindent\n\
will cause @code{nargout} to return 2 inside the function\n\
@code{f}.\n\
\n\
At the top level, @code{nargout} is undefined.\n\
@seealso{nargin, varargin, varargout}\n\
@end deftypefn") |
| DEFUN (optimize_subsasgn_calls, args, nargout,"-*- texinfo -*-\n\
@deftypefn {Built-in Function} {@var{val} =} optimize_subsasgn_calls ()\n\
@deftypefnx {Built-in Function} {@var{old_val} =} optimize_subsasgn_calls (@var{new_val})\n\
Query or set the internal flag for subsasgn method call optimizations.\n\
If true, Octave will attempt to eliminate the redundant copying when calling\n\
subsasgn method of a user-defined class.\n\
@end deftypefn") |
| DEFUN (isargout, args,,"-*- texinfo -*-\n\
@deftypefn {Built-in Function} {} isargout (@var{k})\n\
Within a function, return a logical value indicating whether the argument\n\
@var{k} will be assigned on output to a variable. If the result is false,\n\
the argument has been ignored during the function call through the use of\n\
the tilde (~) special output argument. Functions can use @code{isargout} to\n\
avoid performing unnecessary calculations for outputs which are unwanted.\n\
\n\
If @var{k} is outside the range @code{1:max(nargout)}, the function returns\n\
false. @var{k} can also be an array, in which case the function works\n\
element-by-element and a logical array is returned. At the top level,\n\
@code{isargout} returns an error.\n\
@seealso{nargout, nargin, varargin, varargout}\n\
@end deftypefn") |