view test/nest/recursive_nest.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_nest.m
function x = recursive_nest ()
  global recursive_nest_inc = 1
  x = 5;
  f (20);

  function f (n)
    if (n > 0)
      x = x + recursive_nest_inc;
      f (n - 1);
    end
  endfunction
endfunction