Conditional Compilation: How to use @if blocks
Posted: 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
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