view test/nest/recursive_nest2.m @ 31161:6f4c8063b4c2 stable

GitHub-CI: Remove macos-10.15 runners from build matrix. * .github/workflow/make.yaml (macos): GitHub-hosted runners for macos-10.15 are being deprecated. Remove them from build matrix. See also: https://github.com/actions/virtual-environments/issues/5583
author Markus Mützel <markus.muetzel@gmx.de>
date Wed, 27 Jul 2022 18:30:15 +0200
parents fc4bb4bd1d5e
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