From 38fc19f9d33be968f29d8ab73d0633f4ea1f9c33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=28Charybdis=29?= Date: Wed, 11 Apr 2018 09:17:43 +0000 Subject: [PATCH] Fixed type issue. NaN cannot be used if Int is expected. --- src/SymbolTable.cc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/SymbolTable.cc b/src/SymbolTable.cc index 2742e21b..22da0ae2 100644 --- a/src/SymbolTable.cc +++ b/src/SymbolTable.cc @@ -1059,32 +1059,33 @@ SymbolTable::writeJuliaOutput(ostream &output) const throw (NotYetFrozenExceptio { case avEndoLead: case avExoLead: - break; case avEndoLag: case avExoLag: case avVarModel: output << getTypeSpecificID(aux_vars[i].get_orig_symb_id()) + 1 << ", " - << aux_vars[i].get_orig_lead_lag() << ", NaN, NaN"; + << aux_vars[i].get_orig_lead_lag() << ", typemin(Int), string()"; break; case avDiff: if (aux_vars[i].get_orig_symb_id() >= 0) output << getTypeSpecificID(aux_vars[i].get_orig_symb_id()) + 1 << ", " - << aux_vars[i].get_orig_lead_lag() << ", NaN, NaN"; + << aux_vars[i].get_orig_lead_lag() << ", typemin(Int), string()"; break; case avMultiplier: - output << "NaN, NaN, " << aux_vars[i].get_equation_number_for_multiplier() + 1 - << ", NaN"; + output << "typemin(Int), typemin(Int), " << aux_vars[i].get_equation_number_for_multiplier() + 1 + << ", string()"; break; case avDiffForward: - output << getTypeSpecificID(aux_vars[i].get_orig_symb_id())+1 << ", NaN, "; + output << getTypeSpecificID(aux_vars[i].get_orig_symb_id())+1 << ", typemin(Int), typemin(Int), string()"; break; case avExpectation: - output << "NaN, NaN, NaN, \"\\mathbb{E}_{t" + output << "typemin(Int), typemin(Int), typemin(Int), \"\\mathbb{E}_{t" << (aux_vars[i].get_information_set() < 0 ? "" : "+") << aux_vars[i].get_information_set() << "}("; aux_vars[i].get_expr_node()->writeOutput(output, oLatexDynamicModel); output << ")\""; break; + default: + output << " typemin(Int), typemin(Int), typemin(Int), string()"; } output << ")" << endl; }