Conditional Compilation: How to use @if blocks

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Conditional Compilation: How to use @if blocks

Postby jd_prada » Tue Jul 03, 2007 10:41 pm

Hi

I am having trouble using the conditional compilation @define,@if,@elseif,@else,@end.

My question is: where can I use this conditional compilation?

Because I have a model with many "options": for example, I would like to choose between a model without price-stickiness and one with price-stickiness. The difference between them is a couple of equations and new variables. I would like to have them both written in the same *.mod file. I thougth that using a @if block would help me: something like
@define version 1;
...
model;
@if version == 1;
equations with price stickiness...
@else;
equations without price stickiness...
@end;

I couldn't do that. Is this possible? Which is the correct use for the @if block?


Thanks
The Time Is Near
jd_prada
 
Posts: 7
Joined: Tue Sep 19, 2006 4:19 pm
Location: Colombia

Postby MichelJuillard » Wed Jul 18, 2007 7:58 pm

Conditional compilation isn't available yet in version 4.

Sorry

Michel
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 6 guests