\rhead{\bf mc\_AgentVariableRetrieve()}
\noindent
\vspace{5pt}
\rule{6.5in}{0.015in}
\noindent
\phantomsection
{\LARGE \bf mc\_AgentVariableRetrieve()\index{mc\_AgentVariableRetrieve()}}\\
\addcontentsline{toc}{section}{mc\_AgentVariableRetrieve()}

\noindent
\label{apidoc:mc_AgentVariableRetrieve}
{\bf Synopsis}\\
%{\bf \#include $<$mobilec.h$>$}\\
{\bf void* mc\_AgentVariableSave}({\bf MCAgent\_t} $agent$, {\bf const char*} $variable\_name$, {\bf int} $task\_num$);\\

\noindent
{\bf Purpose}\\
Retrieve a previously saved variable from the agent's datastate. \\

\noindent
{\bf Return Value}\\
A pointer to the data on success, or \texttt{NULL} on failure.

\noindent
{\bf Parameters}
\vspace{-0.1in}
\begin{description}
\item
\begin{tabular}{p{25 mm}p{130 mm}}
$agent$ & The agent for which to save a variable. From agent space, this value 
will typically be \texttt{mc\_current\_agent}, which is a special variable that
is an agent's handle to itself. \\
$variable\_name$ & The name of the variable to save. \\
$task\_num$ & The task from which to retrieve the data.
\end{tabular}
\end{description}

\noindent
{\bf Description}\\
This function is used to retrieve previously saved variables from an agent's
datastate. The task number of the agent from which to retrieve data must be 
specified, and must be less than the number of the agent's current task.

\noindent
{\bf Example}\\
\noindent
{\footnotesize\verbatiminput{../demos/agent_migration_message_format/agent_saved_variables_example/test1.xml}}

\noindent
{\bf See Also}\\
    mc\_AgentVariableSave()

%\CPlot::\DataThreeD(), \CPlot::\DataFile(), \CPlot::\Plotting(), \plotxy().\\
