[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] C Makroer på flere linier



Carsten Svaneborg wrote:

> Martin Møller Pedersen wrote:
>> Hvorfor vil du bruge #if #endif ? Nedenstående virker da fint.
> 
> Det kommer an på hvad x er, og precedence af de operatorer
> der kunne indgå i x.
> 
> 
>> #define PRINT_DEBUG(x,y) \
>> if x<DEBUG_LEVEL cout << "debug: \t " << y << endl; \
> 
> if (x)<DEBUG_LEVEL ..
> 

det var i håb om helt undgå debug koden i programmet hvis ikke DEBUG var
slået til. Det ovenstående vil vel altid give en instruktion med eller uden
debug, medmindre kompileren er klog nok til at slette koden hvis 
if (x < DEBUG) evaluerer til false. 


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2006-03-01, 02:01 CET [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *