trunk preprocessor: fixed bug when both "simul" and "periods" options are given to stoch_simul

git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@2232 ac1d8469-bf42-47a9-8791-bf33cf982152
time-shift
sebastien 2008-11-03 16:35:40 +00:00
parent 00d46f89f9
commit 6a3b09c2b4
1 changed files with 3 additions and 2 deletions

View File

@ -617,8 +617,9 @@ ParsingDriver::option_num(const string &name_option, string *opt)
void
ParsingDriver::option_num(const string &name_option, const string &opt)
{
if (options_list.num_options.find(name_option)
!= options_list.num_options.end())
// Since "periods" option automatically sets "simul" option, we don't want to fail if user explicitly sets both "simul" and "periods"
if (name_option != "simul"
&& (options_list.num_options.find(name_option) != options_list.num_options.end()))
error("option " + name_option + " declared twice");
if ((name_option == "periods") && (mod_file->model_tree.mode == eSparseDLLMode || mod_file->model_tree.mode == eSparseMode))