Mercurial > octave
diff scripts/general/structfun.m @ 30893:e1788b1a315f
maint: Use "fcn" as preferred abbreviation for "function" in m-files.
* accumarray.m, accumdim.m, quadl.m, quadv.m, randi.m, structfun.m,
__is_function__.m, uigetfile.m, uimenu.m, uiputfile.m, doc_cache_create.m,
colorspace_conversion_input_check.m, imageIO.m, argnames.m, vectorize.m,
vectorize.m, normest1.m, inputname.m, nthargout.m, display_info_file.m,
decic.m, ode15i.m, ode15s.m, ode23.m, ode23s.m, ode45.m, odeset.m,
check_default_input.m, integrate_adaptive.m, ode_event_handler.m,
runge_kutta_23.m, runge_kutta_23s.m, runge_kutta_45_dorpri.m,
runge_kutta_interpolate.m, starting_stepsize.m, __all_opts__.m, fminbnd.m,
fminsearch.m, fminunc.m, fsolve.m, fzero.m, sqp.m, fplot.m, plotyy.m,
__bar__.m, __ezplot__.m, flat_entry.html, profexport.m, movfun.m, bicg.m,
bicgstab.m, cgs.m, eigs.m, gmres.m, pcg.m, __alltohandles__.m, __sprand__.m,
qmr.m, tfqmr.m, dump_demos.m:
Replace "func", "fun", "fn" in documentation and variable names with "fcn".
author | Rik <rik@octave.org> |
---|---|
date | Mon, 04 Apr 2022 18:14:56 -0700 |
parents | 5d3faba0342e |
children | 597f3ee61a48 |
line wrap: on
line diff
--- a/scripts/general/structfun.m Mon Apr 04 11:22:26 2022 -0700 +++ b/scripts/general/structfun.m Mon Apr 04 18:14:56 2022 -0700 @@ -24,16 +24,16 @@ ######################################################################## ## -*- texinfo -*- -## @deftypefn {} {@var{A} =} structfun (@var{func}, @var{S}) -## @deftypefnx {} {@var{A} =} structfun (@dots{}, "ErrorHandler", @var{errfunc}) +## @deftypefn {} {@var{A} =} structfun (@var{fcn}, @var{S}) +## @deftypefnx {} {@var{A} =} structfun (@dots{}, "ErrorHandler", @var{errfcn}) ## @deftypefnx {} {@var{A} =} structfun (@dots{}, "UniformOutput", @var{val}) ## @deftypefnx {} {[@var{A}, @var{B}, @dots{}] =} structfun (@dots{}) ## ## Evaluate the function named @var{name} on the fields of the structure -## @var{S}. The fields of @var{S} are passed to the function @var{func} +## @var{S}. The fields of @var{S} are passed to the function @var{fcn} ## individually. ## -## @code{structfun} accepts an arbitrary function @var{func} in the form of an +## @code{structfun} accepts an arbitrary function @var{fcn} in the form of an ## inline function, function handle, or the name of a function (in a character ## string). In the case of a character string argument, the function must ## accept a single argument named @var{x}, and it must return a string value. @@ -57,16 +57,16 @@ ## @end group ## @end example ## -## Given the parameter @qcode{"ErrorHandler"}, @var{errfunc} defines a function -## to call in case @var{func} generates an error. The form of the function is +## Given the parameter @qcode{"ErrorHandler"}, @var{errfcn} defines a function +## to call in case @var{fcn} generates an error. The form of the function is ## ## @example -## function [@dots{}] = errfunc (@var{se}, @dots{}) +## function [@dots{}] = errfcn (@var{se}, @dots{}) ## @end example ## ## @noindent -## where there is an additional input argument to @var{errfunc} relative to -## @var{func}, given by @nospell{@var{se}}. This is a structure with the +## where there is an additional input argument to @var{errfcn} relative to +## @var{fcn}, given by @nospell{@var{se}}. This is a structure with the ## elements @qcode{"identifier"}, @qcode{"message"} and @qcode{"index"}, ## giving respectively the error identifier, the error message, and the index ## into the input arguments of the element that caused the error. For an @@ -75,7 +75,7 @@ ## @seealso{cellfun, arrayfun, spfun} ## @end deftypefn -function varargout = structfun (func, S, varargin) +function varargout = structfun (fcn, S, varargin) if (nargin < 2) print_usage (); @@ -105,7 +105,7 @@ endif varargout = cell (max ([nargout, 1]), 1); - [varargout{:}] = cellfun (func, struct2cell (S), varargin{:}); + [varargout{:}] = cellfun (fcn, struct2cell (S), varargin{:}); if (! uniform_output) varargout = cellfun ("cell2struct", varargout, {fieldnames(S)}, {1}, ...