Skip to content
Snippets Groups Projects
Commit be0dd5e5 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Update macroprocessor slides

(cherry picked from commit 19f6eca2)
parent 46cc740d
Branches
Tags
No related merge requests found
...@@ -2,23 +2,13 @@ ...@@ -2,23 +2,13 @@
\usepackage[utf8]{inputenc} \usepackage[utf8]{inputenc}
\usepackage{amsmath} \usepackage{amsmath}
\mode<handout> \usetheme{Boadilla}
{
\usepackage{pgfpages}
\pgfpagesuselayout{4 on 1}[a4paper,border shrink=3mm,landscape]
\usetheme{Madrid}
\usecolortheme{seagull}
}
\mode<beamer>
{
\usetheme{Madrid}
}
\title{The Dynare Macro-processor} \title{The Dynare Macro-processor}
\subtitle{Dynare Summer School 2012}
\author{Sébastien Villemot} \author{Sébastien Villemot}
\institute{CEPREMAP} \institute{CEPREMAP}
\date{June 20, 2011} \date{June 22, 2012}
\AtBeginSection[] \AtBeginSection[]
{ {
...@@ -95,7 +85,7 @@ ...@@ -95,7 +85,7 @@
\begin{itemize} \begin{itemize}
\item file inclusion: \verb+@#include+ \item file inclusion: \verb+@#include+
\item definition a variable of the macro-processor: \verb+@#define+ \item definition a variable of the macro-processor: \verb+@#define+
\item conditional statements (\verb+@#if/@#else/@#endif+) \item conditional statements (\verb+@#if/@#ifdef/@#else/@#endif+)
\item loop statements (\verb+@#for/@#endfor+) \item loop statements (\verb+@#for/@#endfor+)
\end{itemize} \end{itemize}
\item In most cases, directives occupy exactly one line of text. In case of need, two anti-slashes (\verb+\\+) at the end of the line indicates that the directive is continued on the next line. \item In most cases, directives occupy exactly one line of text. In case of need, two anti-slashes (\verb+\\+) at the end of the line indicates that the directive is continued on the next line.
...@@ -254,7 +244,7 @@ end; ...@@ -254,7 +244,7 @@ end;
\end{frame} \end{frame}
\begin{frame}[fragile=singleslide] \begin{frame}[fragile=singleslide]
\frametitle{Conditional inclusion directive} \frametitle{Conditional inclusion directives (1/2)}
\begin{columns}[T] \begin{columns}[T]
\column{0.47\linewidth} \column{0.47\linewidth}
...@@ -292,6 +282,28 @@ end; ...@@ -292,6 +282,28 @@ end;
\end{block} \end{block}
\end{frame} \end{frame}
\begin{frame}[fragile=singleslide]
\frametitle{Conditional inclusion directives (2/2)}
\begin{columns}[T]
\column{0.47\linewidth}
\begin{block}{Syntax 1}
\verb+@#ifdef +\textit{variable\_name} \\
\verb+ +\textit{body included if variable defined} \\
\verb+@#endif+
\end{block}
\column{0.47\linewidth}
\begin{block}{Syntax 2}
\verb+@#ifdef +\textit{variable\_name} \\
\verb+ +\textit{body included if variable defined} \\
\verb+@#else+ \\
\verb+ +\textit{body included if variable not defined} \\
\verb+@#endif+
\end{block}
\end{columns}
\end{frame}
\begin{frame}[fragile=singleslide] \begin{frame}[fragile=singleslide]
\frametitle{Echo and error directives} \frametitle{Echo and error directives}
...@@ -573,7 +585,7 @@ rhos = [ 0.8, 0.9, 1]; ...@@ -573,7 +585,7 @@ rhos = [ 0.8, 0.9, 1];
\begin{itemize} \begin{itemize}
\item GNU Octave (or simply Octave) is a high-level language, primarily intended for numerical computations \item GNU Octave (or simply Octave) is a high-level language, primarily intended for numerical computations
\item Basically, it is a free clone of MATLAB: same syntax, almost same set of functions \item Basically, it is a free clone of MATLAB: same syntax, almost same set of functions
\item Runs on Windows, Linux and Mac OS X \item Runs on Windows, GNU/Linux and Mac OS X
\item Advantages: \item Advantages:
\begin{itemize} \begin{itemize}
\item free software, no license fee to pay \item free software, no license fee to pay
...@@ -584,7 +596,8 @@ rhos = [ 0.8, 0.9, 1]; ...@@ -584,7 +596,8 @@ rhos = [ 0.8, 0.9, 1];
\begin{itemize} \begin{itemize}
\item slower than MATLAB \item slower than MATLAB
\item less user friendly (however note that there is a graphical fronted \item less user friendly (however note that there is a graphical fronted
called ``qtoctave'' that can be installed on top of Octave) called ``qtoctave'' that can be installed on top of Octave; a native
frontend is under development)
\end{itemize} \end{itemize}
\end{itemize} \end{itemize}
\end{frame} \end{frame}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment