not calling function at run time ..

P

Paras Sharma

Hi ,

I have one Library function DBG() - a kind wrapper kindof function
for printf. ( it takes variable number of parameters )

DBG( stringname, index, " Hello %d %s ..", i,c);
DBG( stringname, index, " Hello %d %c %i %s ..", i,c1, j, c);
........


I am using DBG at many places in the code . Now Just for testing I want
not to call this function at run time.
How to do it without commenting 10000s of places ..

Is there any other like using some hashdefine #define DBG(ABC..)
or some other way.


Thanks in advance .
Paras
 
V

Victor Bazarov

Paras Sharma said:
I have one Library function DBG() - a kind wrapper kindof function
for printf. ( it takes variable number of parameters )

DBG( stringname, index, " Hello %d %s ..", i,c);
DBG( stringname, index, " Hello %d %c %i %s ..", i,c1, j, c);
.......


I am using DBG at many places in the code . Now Just for testing I want
not to call this function at run time.
How to do it without commenting 10000s of places ..

Is there any other like using some hashdefine #define DBG(ABC..)
or some other way.


The crudest way is

#define DBG while (false) DBG

Victor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top