@if ... @elseif ... @else ... @end

@if ... @elseif ... @else ... @end — defines conditional compilation of the *.mod file

Synopsis

@if VARIABLE_NAME LOGICAL_OPERATOR INTEGER ;
...

Description

LOGICAL_OPERATOR are

  • == equal

  • != not equal

  • < lesser than

  • > greater than

  • <= lesser or equal than

  • >= greater or equal than

These commands let the user define which part of the *.mod file should be handled by Dynare

Example

  @define version 1;
  parameters alph bet;
  alph = 0.3;
  @if version == 1;
    bet = 0.9;
  @elseif version == 2;
    bet = 0.95;
  @else;
    bet = 0.98;
  @end;