view test/nest/persistent_nest.m @ 19616:27c5f42a7a64

configure.ac: Add a --without-fltk build option (bug #37773) * configure.ac: Add a --without-fltk option to avoid building against FLTK. This was done previously with --without-opengl, but OpenGL is now also required for Qt plotting.
author Sebastian Schoeps <sebastian@schoeps.org>
date Thu, 15 Jan 2015 21:26:34 -0500
parents be18c9e359bf
children
line wrap: on
line source

# persistent_nest
function y = persistent_nest ()
  persistent x = 0;
  g;
  y = x;

  function g
    x = x + 1;
  end
end