Skip to content
Snippets Groups Projects
Verified Commit c1381f1d authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

:bug: The “onlyclearglobals” option was not actually clearing global variables

The driver was calling “clear” before “global”, hence clearing local and not
global variables (unless “global” had already been called at scope).

Rather use “clearvars -global”.
parent 1e68b2fc
No related branches found
No related tags found
No related merge requests found
Pipeline #10847 passed
......@@ -1065,8 +1065,8 @@ ModFile::writeMOutput(const string& basename, bool clear_all, bool clear_global,
mOutputFile << "clearvars -global" << endl
<< "clear_persistent_variables(fileparts(which('dynare')), false)" << endl;
else if (clear_global)
mOutputFile
<< "clear M_ options_ oo_ estim_params_ bayestopt_ dataset_ dataset_info estimation_info;"
mOutputFile << "clearvars -global M_ options_ oo_ estim_params_ bayestopt_ dataset_ "
"dataset_info estimation_info;"
<< endl;
if (!notime)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment