Page 1 of 1

Two Problems with the Macro Preprocessor

PostPosted: Fri Oct 14, 2011 3:30 pm
by bkjecn
Greetings,

I have encountered two problems with the preprocessor.

1) I cannot comment @# for loops. Doing so breaks Dynare because the preprocessor tries to substitute the variables in the commented lines but does not define the variable as a macro variables.
2) I cannot use what looks like macro language syntax in Matlab commands inside a Dynare mod file. Dynare will complain even if the Matlab command is commented. The reason Dynare breaks is the same as in the first problem.

I attached a very simple example demonstrating both problems. I ran into these problems because it would be nice to be able to comment macro preprocessor lines during model development. It would also be nice to be able to 'disp' the values of macro variables so that they are reported in log files.

I cannot figure out how to submit bugs other than through this board. If there would be a better place to submit problems in the future please let me know.

Best,

Ben

Re: Two Problems with the Macro Preprocessor

PostPosted: Fri Nov 04, 2011 5:12 pm
by SébastienVillemot
Hi,

These problems are not bugs. They are inherent to the way the macroprocessor works.

The macroprocessor is a text processor which runs before everything. It does not know about the commenting syntax, which is processed later.

So we do not plan to change the behaviour that your are encountering.

Do you have an example where it causes a problem in a real-life model? The example you posted is rather pathological.

Best,