Commit 7eb6fa3e authored by sebastien's avatar sebastien
Browse files

v4 preprocessor: fixed bug with "order" option


git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1809 ac1d8469-bf42-47a9-8791-bf33cf982152
parent 0c458023
No preview for this file type
......@@ -49,6 +49,10 @@ ModFile::checkPass()
it != statements.end(); it++)
(*it)->checkPass(mod_file_struct);
// If order option has not been set, default to 2
if (!mod_file_struct.order_option)
mod_file_struct.order_option = 2;
// Allow empty model only when doing a standalone BVAR estimation
if (model_tree.equation_number() == 0
&& (mod_file_struct.check_present
......
......@@ -23,7 +23,7 @@ ModFileStructure::ModFileStructure() :
check_present(false),
simul_present(false),
stoch_simul_or_similar_present(false),
order_option(2)
order_option(0)
{
}
......
......@@ -39,7 +39,8 @@ public:
//! Whether a stoch_simul, estimation, osr, ramsey_policy statement is present
bool stoch_simul_or_similar_present;
//! The value of the "order" option of stoch_simul, estimation, osr, ramsey_policy
/*! Defaults to 2 */
//! Derivation order
/*! First initialized to zero. If user sets order option somewhere in the MOD file, it will be equal to the maximum of order options. Otherwise will default to 2 */
int order_option;
};
......
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