Hi George,
I'm not sure that it is a good idea. dynare++ is a standalone program, and it will not be clear for people looking at the code without knowing it that in normal dynare++ use, mexPrintf means printf.
It would be better to add mexPrint methods on the side of the print method for dynare++ objects and protect the new method with appropriate #if to compile those only when one uses dynare++ code to make a DLL.
Also, printing dynare++ objects is for the kind of debugging that is better done in a standalone test version of the code than in an actual DLL.
All the best,
Michel
G. Perendia wrote:
Hi
I intend to change printf() calls in the <object>print() functions of some of the Dynare++ Sylv exceptions and Vector and GeneralMatrix to mexPrintf()and use following to switch between printf and mexPrintf()
#ifdef MATLAB #include "mex.h" #else #define mexPrintf printf #endif Is that OK or will this cause any problems?
Best regards
George
Dev mailing list Dev@dynare.org http://www.dynare.org/cgi-bin/mailman/listinfo/dev