\section{LOADLIB Load Library Function}

\subsection{Usage}

The \verb|loadlib| function allows a function in an external library
to be added to FreeMat dynamically.  This interface is generally
to be used as last resort, as the form of the function being called
is assumed to match the internal implementation.  In short, this
is not the interface mechanism of choice.  For all but very complicated
functions, the \verb|import| function is the preferred approach. Thus,
only a very brief summary of it is presented here.  The syntax
for \verb|loadlib| is
\begin{verbatim}
  loadlib(libfile, symbolname, functionname, nargin, nargout)
\end{verbatim}
where \verb|libfile| is the complete path to the library to use, \verb|symbolname|
is the name of the symbol in the library, \verb|functionname| is the name
of the function after it is imported into FreeMat (this is optional, it
defaults to the \verb|symbolname|), \verb|nargin| is the number of input arguments
(defaults to 0), and \verb|nargout| is the number of output arguments (defaults
to 0).  If the number of (input or output) arguments is variable then
set the corresponding argument to \verb|-1|.
