v4 preprocessor: fixed bug with "order" option

git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1809 ac1d8469-bf42-47a9-8791-bf33cf982152
time-shift
sebastien 2008-04-24 10:55:26 +00:00
parent 0c45802387
commit 7eb6fa3ed1
4 changed files with 7 additions and 2 deletions

Binary file not shown.

View File

@ -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

View File

@ -23,7 +23,7 @@ ModFileStructure::ModFileStructure() :
check_present(false),
simul_present(false),
stoch_simul_or_similar_present(false),
order_option(2)
order_option(0)
{
}

View File

@ -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;
};