Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
281264 is currently offline  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:
DEPUR(vector);


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
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: I'm a U newbie
Next Topic: tar library for u++
Goto Forum:
  


Current Time: Sun Apr 28 15:12:55 CEST 2024

Total time taken to generate the page: 0.03086 seconds