Stumped by infinite loop in Maxima 5.13.0 (using wxMaxima 0.7.3a)



If I define the function
  nonzerosines(m):=
    block([h,i,j,s],
      s:[],h:2*m-1,
      for i:1 thru h do 
        s:cons(makelist(0,j,1,m),s),
      for i:1 thru h do
        if sin(i*%pi/2)#0 then do s[i][1]:sin(i*%pi/2),
      return(s));
then running 'nonzerosines(1)' produces an infinite loop.  If the function
is put into the file 'test.mac,' then in the Maxima debugger after the
commands
  batchload("f:/maxima/test.mac");
  :br nonzerosines 6;
  nonzerosines(1);
  h;
  i;
  s;
the expected values are displayed for h, i, and s, but then ':n' causes the
loop in the 'if...' line.  Anybody see why?
-- George Leeman