\item The Dynare macro language provides a new set of \textbf{macro commands} that can be used in \texttt{.mod} files
\item The Dynare macro language provides a set of \textbf{macro commands} that can be used in \texttt{.mod} files
\item The macro processor transforms a \texttt{.mod} file with macro commands into a \texttt{.mod} file without macro commands (doing text expansions/inclusions) and then feeds it to the Dynare parser
\item The key point to understand is that the macro processor only does \textbf{text substitution} (like the C preprocessor or the PHP language)
\end{itemize}
...
...
@@ -127,35 +127,33 @@
\item Main directives are:
\begin{itemize}
\item file inclusion: \verb+@#include+
\item definition of a macro processor variable: \verb+@#define+
\item Most directives fit on one line. If needed however, two backslashes (i.e. \verb+\\+) at the end of a line indicate that the directive is continued on the next line.
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Variables}
\frametitle{Values}
\begin{itemize}
\item The macro processor has its own list of variables which are different than model variables and MATLAB/Octave variables
\item There are 6 types of macro-variables:
\item The macro processor can handle values of 5 different types:
\begin{itemize}
\item boolean
\item real
\item string
\item tuple
\item array
\item function
\end{itemize}
\item Variables/literals of the types listed above can be cast to other types
\item Values of the types listed above can be cast to other types
\item range with increment of \texttt{1}: \texttt{1:4} is equivalent to real array \texttt{[1, 2, 3, 4]}. NB \texttt{[1:4]} is equivalent to an array containing an array of reals \texttt{[[1, 2, 3, 4]]}
\item range with unit increment: \texttt{1:4} is equivalent to
real array \texttt{[1, 2, 3, 4]}. (NB: \texttt{[1:4]} is equivalent to an
array containing an array of reals, i.e. \texttt{[[1, 2, 3, 4]]})
\item range with user-defined increment: \texttt{4:-1.1:-1} is equivalent to real array \texttt{[4, 2.9, 1.8, 0.7, -0.4]}.