Home » Community » Newbie corner » Usage of DUMPC and other macros by using flags
Usage of DUMPC and other macros by using flags [message #29338] |
Fri, 15 October 2010 15:21 |
281264
Messages: 270 Registered: June 2010 Location: Spain
|
Experienced Member |
|
|
Hi,
Is there an easy way to control (whether you want them to be executed depending upon you are debugging or not) the execution of, for instance, DUMPC() by using the flags defined in Main Package Configuration dialog?
I have done the following:
1.- I created a flag in the Main Package Configuration:
field Flags: .FLAGDEBUG (the point is for its application in this specific package, is it not?
Field Optional names: flagDEBUG.
2.- I created a .h file like this:
#ifdef flagDEBUG
#define DEPUR(a) DUMPC(a)
#else
#define DEPUR(a)
#endif
3.- I created an additional flag NORMAL (just to control the usage ot DUMPC)
4.- in the .cpp file:
So, it works but it is not elegant at all; so is there a more direct (less baroque) way to do it?
Thank you,
Javier
|
|
|
Goto Forum:
Current Time: Thu Jun 06 07:10:24 CEST 2024
Total time taken to generate the page: 0.02215 seconds
|