\section{SCRIPT Script Files}

\subsection{Usage}

A script is a sequence of FreeMat commands contained in a
\verb|.m| file.  When the script is called (via the name of the
file), the effect is the same as if the commands inside the
script file were issued one at a time from the keyboard.
Unlike \verb|function| files (which have the same extension,
but have a \verb|function| declaration), script files share
the same environment as their callers.  Hence, assignments,
etc, made inside a script are visible to the caller (which
is not the case for functions.
\subsection{Example}

Here is an example of a script that makes some simple 
assignments and \verb|printf| statements.
\begin{verbatim}
    tscript.m
a = 13;
printf('a is %d\n',a);
b = a + 32
\end{verbatim}
If we execute the script and then look at the defined variables
\begin{verbatim}
--> tscript
a is 13
b = 
  <int32>  - size: [1 1]
 45  
--> who
  Variable Name      Type   Flags             Size
              a     int32                    [1 1]
            ans    double                    [0 0]
              b     int32                    [1 1]

\end{verbatim}
we see that \verb|a| and \verb|b| are defined appropriately.
