Mercurial > hg > octave-nkf
changeset 17312:088d014a7fe2
Use semicolon after "return" statement in core m-files.
* scripts/general/accumdim.m, scripts/image/imformats.m, scripts/io/textread.m,
scripts/io/textscan.m, scripts/linear-algebra/expm.m,
scripts/miscellaneous/edit.m, scripts/optimization/lsqnonneg.m,
scripts/optimization/pqpnonneg.m, scripts/pkg/private/dirempty.m,
scripts/plot/findobj.m, scripts/plot/graphics_toolkit.m,
scripts/plot/private/__errplot__.m, scripts/plot/private/__interp_cube__.m,
scripts/plot/private/__marching_cube__.m, scripts/plot/subplot.m,
scripts/polynomial/residue.m, scripts/sparse/sprandsym.m,
scripts/special-matrix/gallery.m, scripts/strings/strjoin.m:
Use semicolon after "return" statement in core m-files.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 21 Aug 2013 19:53:42 -0700 |
parents | 56404cdcb723 |
children | 1e1d42f0f332 |
files | scripts/general/accumdim.m scripts/image/imformats.m scripts/io/textread.m scripts/io/textscan.m scripts/linear-algebra/expm.m scripts/miscellaneous/edit.m scripts/optimization/lsqnonneg.m scripts/optimization/pqpnonneg.m scripts/pkg/private/dirempty.m scripts/plot/findobj.m scripts/plot/graphics_toolkit.m scripts/plot/private/__errplot__.m scripts/plot/private/__interp_cube__.m scripts/plot/private/__marching_cube__.m scripts/plot/subplot.m scripts/polynomial/residue.m scripts/sparse/sprandsym.m scripts/special-matrix/gallery.m scripts/strings/strjoin.m |
diffstat | 19 files changed, 22 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/general/accumdim.m +++ b/scripts/general/accumdim.m @@ -108,7 +108,7 @@ subsc{dim} = mask; A(subsc{:}) = fillval; endif - return + return; endif ## The general case.
--- a/scripts/image/imformats.m +++ b/scripts/image/imformats.m @@ -175,7 +175,7 @@ ## there's no need to go and calculate it all over again if we are ## requested to reset back to factory. if (! isempty (formats)) - return + return; endif ## Building the formats info
--- a/scripts/io/textread.m +++ b/scripts/io/textread.m @@ -73,7 +73,7 @@ if (nlines < 1) printf ("textread: N = 0, no data read\n"); varargout = cell (1, nargout); - return + return; endif ## Read file
--- a/scripts/io/textscan.m +++ b/scripts/io/textscan.m @@ -113,8 +113,7 @@ endif if (nlines < 1) printf ("textscan: N = 0, no data read\n"); - return - endif + return; endif if (! any (strcmpi (args, "emptyvalue"))) ## Matlab returns NaNs for missing values
--- a/scripts/linear-algebra/expm.m +++ b/scripts/linear-algebra/expm.m @@ -83,10 +83,10 @@ if (isscalar (A)) r = exp (A); - return + return; elseif (strfind (typeinfo (A), "diagonal matrix")) r = diag (exp (diag (A))); - return + return; endif n = rows (A);
--- a/scripts/miscellaneous/edit.m +++ b/scripts/miscellaneous/edit.m @@ -208,7 +208,7 @@ else error ('edit: expected "edit MODE sync|async"'); endif - return + return; case "EDITINPLACE" if (ischar (stateval)) if (strcmpi (stateval, "true")) @@ -220,14 +220,14 @@ endif endif FUNCTION.EDITINPLACE = stateval; - return + return; case "GET" if (isfield (FUNCTION, toupper (stateval))) ret = FUNCTION.(toupper (stateval)); else ret = FUNCTION; endif - return + return; otherwise ## If none of the states match, assume both inputs are ## actually both file names to be opened
--- a/scripts/optimization/lsqnonneg.m +++ b/scripts/optimization/lsqnonneg.m @@ -79,7 +79,7 @@ if (nargin == 1 && ischar (c) && strcmp (c, 'defaults')) x = optimset ("MaxIter", 1e5); - return + return; endif if (! (nargin >= 2 && nargin <= 4 && ismatrix (c) && ismatrix (d) && isstruct (options)))
--- a/scripts/optimization/pqpnonneg.m +++ b/scripts/optimization/pqpnonneg.m @@ -72,7 +72,7 @@ if (nargin == 1 && ischar (c) && strcmp (c, 'defaults')) x = optimset ("MaxIter", 1e5); - return + return; endif if (! (nargin >= 2 && nargin <= 4 && ismatrix (c) && ismatrix (d) && isstruct (options)))
--- a/scripts/pkg/private/dirempty.m +++ b/scripts/pkg/private/dirempty.m @@ -40,7 +40,7 @@ endfor if (! found) emp = false; - return + return; endif endfor emp = true;
--- a/scripts/plot/findobj.m +++ b/scripts/plot/findobj.m @@ -180,7 +180,7 @@ ## This is sloppy ... but works like Matlab. if (strcmpi (args{na}, "-not")) h = []; - return + return; endif na = na + 1; endif
--- a/scripts/plot/graphics_toolkit.m +++ b/scripts/plot/graphics_toolkit.m @@ -53,7 +53,7 @@ if (all (isfigure (name))) hlist = name; retval = get (hlist, "__graphics_toolkit__"); - return + return; elseif (! ischar (name)) error ("graphics_toolkit: invalid graphics toolkit NAME"); endif
--- a/scripts/plot/private/__errplot__.m +++ b/scripts/plot/private/__errplot__.m @@ -287,7 +287,7 @@ xldata, xudata, "yerr", xscale, yscale); xdata = [x1; x2]; ydata = [y1; y2]; - return + return; else error ("errorbar: valid error bar types are xerr, yerr, boxxy, and xyerr"); endif
--- a/scripts/plot/private/__interp_cube__.m +++ b/scripts/plot/private/__interp_cube__.m @@ -47,7 +47,7 @@ ##endif if (isempty (v)) Vxyz = idx = frac = []; - return + return; endif switch (req)
--- a/scripts/plot/private/__marching_cube__.m +++ b/scripts/plot/private/__marching_cube__.m @@ -149,7 +149,7 @@ id = find (cedge); # select only voxels which are intersected if (isempty (id)) T = p = col = []; - return + return; endif ## phase II: calculate the list of intersection points
--- a/scripts/plot/subplot.m +++ b/scripts/plot/subplot.m @@ -277,7 +277,7 @@ else pos = get (0, "defaultaxesouterposition"); endif - return + return; endif if (strcmp (position_property, "outerposition")
--- a/scripts/polynomial/residue.m +++ b/scripts/polynomial/residue.m @@ -160,7 +160,7 @@ ## The inputs are the residue, pole, and direct part. Solve for the ## corresponding numerator and denominator polynomials [r, p] = rresidue (b, a, varargin{1}, toler, e); - return + return; endif ## Make sure both polynomials are in reduced form.
--- a/scripts/sparse/sprandsym.m +++ b/scripts/sparse/sprandsym.m @@ -121,7 +121,7 @@ ## Degenerate case if (k == 1) r = 1; - return + return; endif ## Compute the stuff described above