Bug in preprocessor evaluation of periods
Dear all, the attached mod-file runs with the code: //periods 4, 5, 6, 7, 8; periods 4:8; When I switch from the second to the first line, which should be equivalent, I get ERROR: rbc_det3.mod:68.1-71.12: shocks/conditional_forecast_paths: variable EfficiencyInnovation: number of periods is different from number of shock values This looks like a bug. Best, Johannes P.S.: Github issues do not allow for attachments, so I am sending this file the old school way. -------- Johannes Pfeifer Haußerstr. 29 72076 Tübingen Tel.: +49-(0)7071-6396184 Mobil: +49-(0)170-6936820 jpfeifer@gmx.de
Hi Johannes, Le vendredi 01 mars 2013 à 16:14 -0500, Johannes Pfeifer a écrit :
the attached mod-file runs with the code:
//periods 4, 5, 6, 7, 8;
periods 4:8;
When I switch from the second to the first line, which should be equivalent, I get
ERROR: rbc_det3.mod:68.1-71.12: shocks/conditional_forecast_paths: variable EfficiencyInnovation: number of periods is different from number of shock values
This is not a bug but a desired behavior. The two different ways in which you wrote the `periods' statement have a different semantics. When you write a range, you mean that you want the same value for the shocks in all periods from 4 to 8, and therefore you should put only one value in the `values' statement. I understand that it is a bit counter-intuitive when you provide a vector in the `values' statement. But this is how things have always been in Dynare. Best, -- Sébastien Villemot Researcher in Economics Dynare developer http://www.dynare.org/sebastien
participants (2)
-
Johannes Pfeifer -
Sébastien Villemot