diff --git a/doc/dynare.texi b/doc/dynare.texi index 924eb95d9..be59f7144 100644 --- a/doc/dynare.texi +++ b/doc/dynare.texi @@ -10767,7 +10767,7 @@ and to abort. The argument must evaluate to a string. @deffnx {Macro directive} @@#echomacrovars(save) @var{MACRO_EXPRESSION} Asks the preprocessor to display the value of all macro variables up until this point. If the @code{save} option is passed, the values of the macro variables -are saved to @code{options_.macrovars}. +are saved to @code{options_.macrovars_line_<>}. @end deffn @node Typical usages diff --git a/preprocessor/macro/MacroDriver.cc b/preprocessor/macro/MacroDriver.cc index 1633b8132..bd15152b3 100644 --- a/preprocessor/macro/MacroDriver.cc +++ b/preprocessor/macro/MacroDriver.cc @@ -229,6 +229,6 @@ MacroDriver::printvars(const Macro::parser::location_type &l, const bool tostdou for (map::const_iterator it = env.begin(); it != env.end(); it++) - intomfile<< "options_.macrovars." << it->first << " = " << it->second->print() << ";" << endl; + intomfile<< "options_.macrovars_line_" << l.begin.line << "." << it->first << " = " << it->second->print() << ";" << endl; return intomfile.str(); }