view test/nest/recursive_nest2.m @ 16651:4e50bd2946d8 ss-3-7-4

snapshot 3.7.4 * configure.ac (OCTAVE_VERSION): Bump to 3.7.4.
author John W. Eaton <jwe@octave.org>
date Mon, 13 May 2013 08:07:15 -0400
parents be18c9e359bf
children 683f9c39da06
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