Commit 8113c88a authored by Houtan Bastani's avatar Houtan Bastani
Browse files

preprocessor: histval should only accept lag values <= 0. closes #1510

parent 91a954ed
......@@ -546,6 +546,9 @@ ParsingDriver::hist_val(string *name, string *lag, expr_t rhs)
error("histval: " + *name + " should be an endogenous or exogenous variable");
int ilag = atoi(lag->c_str());
if (ilag > 0)
error("histval: the lag on " + *name + " should be less than or equal to 0");
pair<int, int> key(symb_id, ilag);
if (mod_file->dynamic_model.minLagForSymbol(symb_id) > ilag - 1)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment