view test/nest/recursive_nest2.m @ 15564:b66be1cb12ca default tip

Merge proper file rename
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Thu, 25 Oct 2012 16:48:35 -0400
parents be18c9e359bf
children
line wrap: on
line source

# recursive_nest2.m
function x = recursive_nest2 ()
  x = B (20);
  function v = B (n)
    Y = 0;
    BB (n);
    C;
    v = Y;
    function BB (m)
      if m > 0
	Y = Y + 1;
	BB(m - 1);
	C;
      end
    endfunction
  endfunction

  function C
    Y = 0;
  endfunction
endfunction