Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynare
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marco Ratto
dynare
Commits
be0dd5e5
Commit
be0dd5e5
authored
12 years ago
by
Sébastien Villemot
Browse files
Options
Downloads
Patches
Plain Diff
Update macroprocessor slides
(cherry picked from commit
19f6eca2
)
parent
46cc740d
No related branches found
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/macroprocessor/macroprocessor.tex
+30
-17
30 additions, 17 deletions
doc/macroprocessor/macroprocessor.tex
with
30 additions
and
17 deletions
doc/macroprocessor/macroprocessor.tex
+
30
−
17
View file @
be0dd5e5
...
...
@@ -2,23 +2,13 @@
\usepackage
[utf8]
{
inputenc
}
\usepackage
{
amsmath
}
\mode
<handout>
{
\usepackage
{
pgfpages
}
\pgfpagesuselayout
{
4 on 1
}
[a4paper,border shrink=3mm,landscape]
\usetheme
{
Madrid
}
\usecolortheme
{
seagull
}
}
\mode
<beamer>
{
\usetheme
{
Madrid
}
}
\usetheme
{
Boadilla
}
\title
{
The Dynare Macro-processor
}
\subtitle
{
Dynare Summer School 2012
}
\author
{
Sébastien Villemot
}
\institute
{
CEPREMAP
}
\date
{
June 2
0
, 201
1
}
\date
{
June 2
2
, 201
2
}
\AtBeginSection
[]
{
...
...
@@ -95,7 +85,7 @@
\begin{itemize}
\item
file inclusion:
\verb
+
@#include
+
\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
+
)
\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.
...
...
@@ -254,7 +244,7 @@ end;
\end{frame}
\begin{frame}
[fragile=singleslide]
\frametitle
{
Conditional inclusion directive
}
\frametitle
{
Conditional inclusion directive
s (1/2)
}
\begin{columns}
[T]
\column
{
0.47
\linewidth
}
...
...
@@ -292,6 +282,28 @@ end;
\end{block}
\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]
\frametitle
{
Echo and error directives
}
...
...
@@ -573,7 +585,7 @@ rhos = [ 0.8, 0.9, 1];
\begin{itemize}
\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
Runs on Windows, Linux and Mac OS X
\item
Runs on Windows,
GNU/
Linux and Mac OS X
\item
Advantages:
\begin{itemize}
\item
free software, no license fee to pay
...
...
@@ -584,7 +596,8 @@ rhos = [ 0.8, 0.9, 1];
\begin{itemize}
\item
slower than MATLAB
\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{frame}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment