a=34; function y=f(x); pause; a = %pi; pause; y=g(x); endfunction function y=g(x); b = %e ; y=sin(x); pause; endfunction f(5) a /// \sleftarrow{\normalfont a pause in \verb+f+. We can check variables from the stacked environments } b= 56; /// \sleftarrow{\normalfont here we create a variable in the pause environment} resume /// \sleftarrow{\normalfont quit the first pause and stop at the second one still in \verb+f+} a /// \sleftarrow{\normalfont the value of \verb+a+ in the local environment of \verb+f+ } resume /// \sleftarrow{\normalfont quit the pause and stop in the next one in \verb+g+} exists('b','local') /// \sleftarrow{\normalfont the value of \verb+b+ in \verb+g+ environment} resume /// \sleftarrow{\normalfont go on } a=g(4); /// \sleftarrow{\normalfont stop in \verb+g+} [y]=resume(456); /// \sleftarrow{\normalfont quit the pause environment and copy a variable in {function} \verb+g+ environment} a /// \sleftarrow{\normalfont the returned \verb+g+ value is the \verb+y+ value that was set by the \verb+resume+ function}