function y=foo(x,g) ; y=g(x);endfunction /// \sleftarrow{\normalfont a {function} } typeof(foo)/// \sleftarrow{\normalfont a {function} is a Scilab object } ///withPrompt foo(%pi,sin) /// \sleftarrow{\normalfont functions can be used as {function} arguments (primitive \verb+sin+)} foo(%pi,sinh)== sinh(%pi) /// \sleftarrow{\normalfont the same with the macro \verb+sinh+} v=rand(1,10); foo(3,v) /// \sleftarrow{\normalfont {function} call and matrix extraction have the same syntax.}