global a; /// \sleftarrow{\normalfont \verb+a+ is now a global variable, its default value is \verb+[]+} isglobal(a) /// \sleftarrow{\normalfont just checks \ldots } function f(); global('a'); a=int(10*rand(1,4)); endfunction f() /// \sleftarrow{\normalfont calling \verb+f+, which contains a global declaration of \verb+a+} a /// \sleftarrow{\normalfont calling \verb+f+ has changed \verb+a+}