[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#6869: Octave mode: incorrect "unbalanced block" warning

From: Sprague, Webb (OFM)
Subject: bug#6869: Octave mode: incorrect "unbalanced block" warning
Date: Mon, 16 Aug 2010 16:35:49 -0700

Hi there,

I am getting "unbalanced block" warnings when I hit tab on the
"endfunction" at the end of an m-file (function is cut-and-pasted
below).  It is on windows, but I don't think that is the cause of *this*
bug. I have tested the function and it works fine, so I don't think it
is my octave code.

I also don't think it is because it is an endfunction -- I have gotten
other "unbalanced block" warnings with for loops and such, they are just
harder to duplicate for bug reports.  Usually indentation works fine,
but sometimes it goes wonky for some reason.

(version) gives:

"GNU Emacs 23.2.1 (i386-mingw-nt5.1.2600)
 of 2010-05-08 on G41R2F1"

Thanks to the coders and maintainers for working on this!

function res = tcomp (fn)
  %% res = tcomp (fn)
  %%     imports components and rearranges them.
  if nargin ~= 1

  data = dlmread(fn, 3, 0);

  x = data(:,2:end);

  cnty = repmat(x(:,1)(:), 10, 1);

  pop = x(:,1:10)(:);
  bir = x(:,11:20)(:);
  dth = x(:,21:30)(:);
  imig = x(:,31:40)(:);
  dmig = x(:,41:50)(:);
  gq = x(:,51:60)(:);
  yrs = repmat(2000:2009, 39, 1)(:);

  res = [yrs, cnty, pop, bir, dth, imig, dmig, gq];


reply via email to

[Prev in Thread] Current Thread [Next in Thread]