Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Re: not calling function at run time ..

Reply
Thread Tools

Re: not calling function at run time ..

 
 
Wictory
Guest
Posts: n/a
 
      06-24-2003
On Tue, 24 Jun 2003 21:10:47 +0530
Paras Sharma <> wrote:

> 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
>


You can comment every call to the function (as you mentioned above)
or you can subtitute the function DBG() with a dummy function like:

/*
The real DBG() function:

DBG()
{

your function code;

}

*/
/* Here is a sample dummy function: */

DBG()
{

return 0;

}

-- Wictory
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run-time template list definition / Run-time variable type definition Pierre Yves C++ 2 01-10-2008 02:52 PM
write a function such that when ever i call this function in some other function .it should give me tha data type and value of calling function parameter komal C++ 6 01-25-2005 11:13 AM
Re: not calling function at run time .. Derk Gwen C Programming 0 06-24-2003 08:45 PM
Re: not calling function at run time .. Mark A. Odell C Programming 4 06-24-2003 06:20 PM
not calling function at run time .. Paras Sharma C++ 1 06-24-2003 03:51 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57