changeset 26268:6dd232798997

maint: Remove useless ';' from end of for, if, while, etc. statements. * circshift.m, sortrows.m, setappdata.m, krylov.m, edit.m, fact.m, odemergeopts.m, load_packages_and_dependencies.m, hidden.m, whitebg.m, area.m, comet.m, comet3.m, __stem__.m, __actual_axis_position__.m, __gnuplot_draw_axes__.m, subplot.m, ppjumps.m, ppval.m, arch_fit.m, autoreg_matrix.m, fftfilt.m, periodogram.m, betaincinv.m, cosint.m, discrete_cdf.m, discrete_inv.m, iqr.m: Remove useless ';' from end of for, if, while, etc. statements.
author Rik <rik@octave.org>
date Wed, 19 Dec 2018 16:01:32 -0800
parents 298c30063b2f
children 4d4a385e6390 7afff15260ad
files scripts/general/circshift.m scripts/general/sortrows.m scripts/gui/setappdata.m scripts/linear-algebra/krylov.m scripts/miscellaneous/edit.m scripts/miscellaneous/fact.m scripts/ode/private/odemergeopts.m scripts/pkg/private/load_packages_and_dependencies.m scripts/plot/appearance/hidden.m scripts/plot/appearance/whitebg.m scripts/plot/draw/area.m scripts/plot/draw/comet.m scripts/plot/draw/comet3.m scripts/plot/draw/private/__stem__.m scripts/plot/util/__actual_axis_position__.m scripts/plot/util/private/__gnuplot_draw_axes__.m scripts/plot/util/subplot.m scripts/polynomial/ppjumps.m scripts/polynomial/ppval.m scripts/signal/arch_fit.m scripts/signal/autoreg_matrix.m scripts/signal/fftfilt.m scripts/signal/periodogram.m scripts/specfun/betaincinv.m scripts/specfun/cosint.m scripts/statistics/discrete_cdf.m scripts/statistics/discrete_inv.m scripts/statistics/iqr.m
diffstat 28 files changed, 34 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/general/circshift.m	Wed Dec 19 15:33:31 2018 -0800
+++ b/scripts/general/circshift.m	Wed Dec 19 16:01:32 2018 -0800
@@ -91,7 +91,7 @@
   endif
 
   idx = repmat ({':'}, 1, nd);
-  for i = 1:length (n);
+  for i = 1:length (n)
     b = n(i);
     d = sz(i);
     if (b > 0)
--- a/scripts/general/sortrows.m	Wed Dec 19 15:33:31 2018 -0800
+++ b/scripts/general/sortrows.m	Wed Dec 19 16:01:32 2018 -0800
@@ -114,7 +114,7 @@
   indices = flipud (indices);
   mode = flipud (mode');
   i = [1:rows(m)]';
-  for j = 1:length (indices);
+  for j = 1:length (indices)
     M = m(i, indices(j));
     if (iscell (M) && ! iscellstr (M))
       M = cell2mat (M);
--- a/scripts/gui/setappdata.m	Wed Dec 19 15:33:31 2018 -0800
+++ b/scripts/gui/setappdata.m	Wed Dec 19 16:01:32 2018 -0800
@@ -59,9 +59,9 @@
     values = varargin{2};
     n_names = numel (names);
     n_value = numel (values);
-    if (n_value == 1 && n_names > 1);
+    if (n_value == 1 && n_names > 1)
       values = repmat (values, [1, n_names]);
-    elseif (n_names != n_value);
+    elseif (n_names != n_value)
       error ("setappdata: number of NAME and VALUE arguments must match");
     endif
     varargin = cell (1, 2*numel (names));
--- a/scripts/linear-algebra/krylov.m	Wed Dec 19 15:33:31 2018 -0800
+++ b/scripts/linear-algebra/krylov.m	Wed Dec 19 16:01:32 2018 -0800
@@ -221,7 +221,7 @@
   ## Back out complete U matrix.
   ## back out U matrix.
   j1 = columns (U);
-  for i = j1:-1:1;
+  for i = j1:-1:1
     idx = pivot_vec(i:na);
     hv = U(idx,i);
     av = alpha(i);
--- a/scripts/miscellaneous/edit.m	Wed Dec 19 15:33:31 2018 -0800
+++ b/scripts/miscellaneous/edit.m	Wed Dec 19 16:01:32 2018 -0800
@@ -332,7 +332,7 @@
 
     ## If editing a new file, prompt for creation if GUI is running
     if (isguirunning ())
-      if (! __octave_link_edit_file__ (file, "prompt"));
+      if (! __octave_link_edit_file__ (file, "prompt"))
         return;
       endif
     endif
--- a/scripts/miscellaneous/fact.m	Wed Dec 19 15:33:31 2018 -0800
+++ b/scripts/miscellaneous/fact.m	Wed Dec 19 16:01:32 2018 -0800
@@ -274,7 +274,7 @@
   out = "\n";
   i = 1;
   numwords = numel (wc);
-  while (i <= numwords);
+  while (i <= numwords)
     line = wc{i};
     while (i < numwords
            && length (newline = [line " " wc{i+1}]) < ncol)
--- a/scripts/ode/private/odemergeopts.m	Wed Dec 19 15:33:31 2018 -0800
+++ b/scripts/ode/private/odemergeopts.m	Wed Dec 19 16:01:32 2018 -0800
@@ -19,7 +19,7 @@
 function options = odemergeopts (caller, useroptions, options, classes,
                                  attributes);
 
-  for [value, key] = options;
+  for [value, key] = options
 
     if (isfield (useroptions, key) && ! isempty (useroptions.(key)))
 
--- a/scripts/pkg/private/load_packages_and_dependencies.m	Wed Dec 19 15:33:31 2018 -0800
+++ b/scripts/pkg/private/load_packages_and_dependencies.m	Wed Dec 19 16:01:32 2018 -0800
@@ -28,7 +28,7 @@
   idx = load_package_dirs (idx, [], handle_deps, installed_pkgs_lst);
   dirs = {};
   execpath = EXEC_PATH ();
-  for i = idx;
+  for i = idx
     ndir = installed_pkgs_lst{i}.dir;
     dirs{end+1} = ndir;
     if (isfolder (fullfile (dirs{end}, "bin")))
--- a/scripts/plot/appearance/hidden.m	Wed Dec 19 15:33:31 2018 -0800
+++ b/scripts/plot/appearance/hidden.m	Wed Dec 19 16:01:32 2018 -0800
@@ -51,7 +51,7 @@
     endif
   endif
 
-  for h = (get (gca (), "children")).';
+  for h = (get (gca (), "children")).'
     [htype, htag] = get (h, {"type", "tag"}){:};
     if (strcmp (htype, "surface") || strcmp (htag, "trimesh"))
       fc = get (h, "facecolor");
--- a/scripts/plot/appearance/whitebg.m	Wed Dec 19 15:33:31 2018 -0800
+++ b/scripts/plot/appearance/whitebg.m	Wed Dec 19 16:01:32 2018 -0800
@@ -119,7 +119,7 @@
       fields = fieldnames (props);
       ## Find all fields with the word color in them and invert.
       idx = find (! cellfun ("isempty", regexp (fields, 'color$')));
-      for field = fields(idx)';
+      for field = fields(idx)'
         c = props.(field{1});
         if (! ischar (c) && columns (c) == 3)
           set (h, field{1}, 1 - c);
@@ -150,7 +150,7 @@
         fields = fieldnames (props);
         ## Find all fields with the word color in them and adjust HSV.
         idx = find (! cellfun ("isempty", regexp (fields, 'color$')));
-        for field = fields(idx)';
+        for field = fields(idx)'
           c = props.(field{1});
           if (! ischar (c) && columns (c) == 3)
             set (h, field{1}, calc_contrast_color (bg, c));
--- a/scripts/plot/draw/area.m	Wed Dec 19 15:33:31 2018 -0800
+++ b/scripts/plot/draw/area.m	Wed Dec 19 16:01:32 2018 -0800
@@ -137,7 +137,7 @@
   y0 = bv * ones (1, rows (y));
   y0 = zeros (1, rows (y));
   retval = [];
-  for i = 1: columns (y);
+  for i = 1: columns (y)
 
     lc = __next_line_color__ ();
 
--- a/scripts/plot/draw/comet.m	Wed Dec 19 15:33:31 2018 -0800
+++ b/scripts/plot/draw/comet.m	Wed Dec 19 16:01:32 2018 -0800
@@ -73,7 +73,7 @@
                x(1), y(1), "color", "b", "marker", "o");
     axis (limits);  # set manual limits to speed up plotting
 
-    for n = 2:(num+dn);
+    for n = 2:(num+dn)
       m = n - dn;
       m = max ([m, 1]);
       k = min ([n, num]);
--- a/scripts/plot/draw/comet3.m	Wed Dec 19 15:33:31 2018 -0800
+++ b/scripts/plot/draw/comet3.m	Wed Dec 19 16:01:32 2018 -0800
@@ -76,7 +76,7 @@
                 x(1), y(1), z(1), "color", "b", "marker", "o");
     axis (limits);  # set manual limits to speed up plotting
 
-    for n = 2:(num+dn);
+    for n = 2:(num+dn)
       m = n - dn;
       m = max ([m, 1]);
       k = min ([n, num]);
--- a/scripts/plot/draw/private/__stem__.m	Wed Dec 19 15:33:31 2018 -0800
+++ b/scripts/plot/draw/private/__stem__.m	Wed Dec 19 16:01:32 2018 -0800
@@ -447,7 +447,7 @@
     x = x(1:sz(1),1:sz(2));
     y = y(1:sz(1),1:sz(2));
     z = z(1:sz(1),1:sz(2));
-  elseif (numel (x) != numel (y));
+  elseif (numel (x) != numel (y))
     sz = min ([size(x); size(y)]);
     x = x(1:sz(1),1:sz(2));
     y = y(1:sz(1),1:sz(2));
--- a/scripts/plot/util/__actual_axis_position__.m	Wed Dec 19 15:33:31 2018 -0800
+++ b/scripts/plot/util/__actual_axis_position__.m	Wed Dec 19 16:01:32 2018 -0800
@@ -68,7 +68,7 @@
     orig_aspect_ratio_2d = pos_in_pixels(3:4);
     rel_aspect_ratio_2d = aspect_ratio_2d ./ orig_aspect_ratio_2d;
     rel_aspect_ratio_2d ./= max (rel_aspect_ratio_2d);
-    if (rel_aspect_ratio_2d(1) < rel_aspect_ratio_2d(2));
+    if (rel_aspect_ratio_2d(1) < rel_aspect_ratio_2d(2))
       dx = (1.0 - rel_aspect_ratio_2d(1)) * pos_in_pixels(3);
       pos_in_pixels += dx*[0.5, 0.0, -1.0, 0.0];
     elseif (rel_aspect_ratio_2d(1) > rel_aspect_ratio_2d(2))
--- a/scripts/plot/util/private/__gnuplot_draw_axes__.m	Wed Dec 19 15:33:31 2018 -0800
+++ b/scripts/plot/util/private/__gnuplot_draw_axes__.m	Wed Dec 19 16:01:32 2018 -0800
@@ -1850,7 +1850,7 @@
   tick ('y', obj.ycolor, obj.tickdir, mirrorstr);
   tick ('z', obj.zcolor, obj.tickdir, mirrorstr);
 
-  function tick (axischar, color, tickdir, mirrorstr);
+  function tick (axischar, color, tickdir, mirrorstr)
     if (isnumeric (color))
       if (length (color) == 3)
         colorspec = sprintf ('rgb "#%02x%02x%02x"', round (255*color));
--- a/scripts/plot/util/subplot.m	Wed Dec 19 15:33:31 2018 -0800
+++ b/scripts/plot/util/subplot.m	Wed Dec 19 16:01:32 2018 -0800
@@ -436,7 +436,7 @@
       if (iscell (opos))
         opos = cell2mat (opos);
       endif
-      for ii = 1:numel (hsubplots);
+      for ii = 1:numel (hsubplots)
         set (hsubplots(ii), "outerposition", opos(ii,:), ...
              "activepositionproperty", "position");
       endfor
--- a/scripts/polynomial/ppjumps.m	Wed Dec 19 15:33:31 2018 -0800
+++ b/scripts/polynomial/ppjumps.m	Wed Dec 19 16:01:32 2018 -0800
@@ -50,7 +50,7 @@
     llim = shiftdim (reshape (P(1:(n-1) * prod (d), 1), [d, n-1]), nd - 1);
   endif
 
-  for i = 2 : k;
+  for i = 2 : k
     llim .*= dx;
     llim += shiftdim (reshape (P(1:(n-1) * prod (d), i), [d, n-1]), nd - 1);
   endfor
--- a/scripts/polynomial/ppval.m	Wed Dec 19 15:33:31 2018 -0800
+++ b/scripts/polynomial/ppval.m	Wed Dec 19 16:01:32 2018 -0800
@@ -80,7 +80,7 @@
     yi = shiftdim (reshape (Pidx, dimvec), ndv - 1);
   endif
 
-  for i = 2 : k;
+  for i = 2 : k
     yi .*= dx;
     yi += shiftdim (reshape (Pidx(i,:), dimvec), ndv - 1);
   endfor
--- a/scripts/signal/arch_fit.m	Wed Dec 19 15:33:31 2018 -0800
+++ b/scripts/signal/arch_fit.m	Wed Dec 19 16:01:32 2018 -0800
@@ -91,15 +91,15 @@
   esq = e.^2;
   Z = autoreg_matrix (esq, p);
 
-  for i = 1 : iter;
+  for i = 1 : iter
     h   = Z * a;
     tmp = esq ./ h.^2 - 1 ./ h;
     s   = 1 ./ h(1:T-p);
-    for j = 1 : p;
+    for j = 1 : p
       s -= a(j+1) * tmp(j+1:T-p+j);
     endfor
     r = 1 ./ h(1:T-p);
-    for j = 1:p;
+    for j = 1:p
       r += 2 * h(j+1:T-p+j).^2 .* esq(1:T-p);
     endfor
     r = sqrt (r);
--- a/scripts/signal/autoreg_matrix.m	Wed Dec 19 15:33:31 2018 -0800
+++ b/scripts/signal/autoreg_matrix.m	Wed Dec 19 16:01:32 2018 -0800
@@ -44,7 +44,7 @@
   T = length (y);
   y = reshape (y, T, 1);
   X = ones (T, k+1);
-  for j = 1 : k;
+  for j = 1 : k
     X(:, j+1) = [(zeros (j, 1)); y(1:T-j)];
   endfor
 
--- a/scripts/signal/fftfilt.m	Wed Dec 19 15:33:31 2018 -0800
+++ b/scripts/signal/fftfilt.m	Wed Dec 19 16:01:32 2018 -0800
@@ -85,7 +85,7 @@
     B = B(:, ones (c_x,1));
     R = ceil (r_x / L);
     y = zeros (r_x, c_x);
-    for r = 1:R;
+    for r = 1:R
       lo = (r - 1) * L + 1;
       hi = min (r * L, r_x);
       tmp = zeros (n, c_x);
--- a/scripts/signal/periodogram.m	Wed Dec 19 15:33:31 2018 -0800
+++ b/scripts/signal/periodogram.m	Wed Dec 19 16:01:32 2018 -0800
@@ -151,7 +151,7 @@
 
   if (! isempty (window))
     n = sumsq (window);
-  endif;
+  endif
   Pxx = (abs (fft (x, nfft))) .^ 2 / n;
 
   if (use_w_freq)
--- a/scripts/specfun/betaincinv.m	Wed Dec 19 15:33:31 2018 -0800
+++ b/scripts/specfun/betaincinv.m	Wed Dec 19 16:01:32 2018 -0800
@@ -161,7 +161,7 @@
   i_upp = (! i_low);
 
   idx = todo & i_low;
-  if (any (idx));
+  if (any (idx))
     n = nnz (idx);
     ## Function and derivative of the lower version.
     F = @(x, a, b, y) y - betainc (x, a, b);
@@ -178,7 +178,7 @@
   endif
 
   idx = todo & i_upp;
-  if (any (idx));
+  if (any (idx))
     n = nnz (idx);
     ## Function and derivative of the upper version.
     F = @(x, a, b, y) y - betainc (x, a, b, "upper");
--- a/scripts/specfun/cosint.m	Wed Dec 19 15:33:31 2018 -0800
+++ b/scripts/specfun/cosint.m	Wed Dec 19 16:01:32 2018 -0800
@@ -140,7 +140,7 @@
   flag_sum = true (nnz (todo), 1);
   it = 0;
   maxit = 300;
-  while (any (flag_sum) && (++it < maxit));
+  while (any (flag_sum) && (++it < maxit))
     ssum .*= - xx .^ 2 * (2 * it) / ((2 * it + 2) ^ 2 * (2 * it + 1));
     yy(flag_sum) += ssum (flag_sum);
     flag_sum = (abs (ssum) >= tol);
--- a/scripts/statistics/discrete_cdf.m	Wed Dec 19 15:33:31 2018 -0800
+++ b/scripts/statistics/discrete_cdf.m	Wed Dec 19 16:01:32 2018 -0800
@@ -42,7 +42,7 @@
 
   p = p(:) / sum (p);   # Reshape and normalize probability vector
 
-  if (isa (x, "single") || isa (v, "single") || isa (p, "single"));
+  if (isa (x, "single") || isa (v, "single") || isa (p, "single"))
     cdf = NaN (size (x), "single");
   else
     cdf = NaN (size (x));
--- a/scripts/statistics/discrete_inv.m	Wed Dec 19 15:33:31 2018 -0800
+++ b/scripts/statistics/discrete_inv.m	Wed Dec 19 16:01:32 2018 -0800
@@ -43,7 +43,7 @@
     error ("discrete_inv: P must be a nonzero, non-negative vector");
   endif
 
-  if (isa (x, "single") || isa (v, "single") || isa (p, "single"));
+  if (isa (x, "single") || isa (v, "single") || isa (p, "single"))
     inv = NaN (size (x), "single");
   else
     inv = NaN (size (x));
@@ -51,7 +51,7 @@
 
   ## FIXME: This isn't elegant.  But cumsum and lookup together produce
   ## different results when called with a single or a double.
-  if (isa (p, "single"));
+  if (isa (p, "single"))
     p = double (p);
   endif
 
--- a/scripts/statistics/iqr.m	Wed Dec 19 15:33:31 2018 -0800
+++ b/scripts/statistics/iqr.m	Wed Dec 19 16:01:32 2018 -0800
@@ -68,7 +68,7 @@
     y = zeros (sz);
   endif
   stride = prod (sz(1:dim-1));
-  for i = 1 : nel / n;
+  for i = 1 : nel / n
     offset = i;
     offset2 = 0;
     while (offset > stride)