Conditional pre-processing

  • The C preprocessor provide these conditional pre-processing directives:

      Conditional directive         Meaning
      ==========================================================
      #ifdef   Name               Pre-process ... when 
      ...                         "Name" has been #defined
      #endif
    
      #ifndef   Name              Pre-process ... when 
      ...                         "Name" has not been #defined
      #endif
    
      #if Condition               Pre-process ... when 
      ...                         "Condition" is true
      #endif 

  • I will not discuss the

      #if Condition    

    clause because it is rarely used.