PPWIZARD Manual
[Bottom][Contents][Search][Prev]: #if[Next]: #ifndef

#ifdef

A #ifdef command (like #if and #ifndef) can be used to conditionally include lines of text, this can be any other type of line or command except #elseif or #endif.

#if commands can be nested to any level and there need not be any lines between a #if command and a #endif or #elseif command.

Note that this command only checks on a single variable, for more complex requirements you will need to use a #if command along with calls to the Defined() routine. For performance reasons its recommended that you use #ifdef and #ifndef commands where possible.

Syntax

    [WhiteSpace]#ifdef  VariableName
    

The "VariableName" specifies a variable that should exist for the test to evaluate to true.

Example

    #define Fred FredsValue
    #ifdef Fred
        ...
    #endif
    


[Top][Contents][Search][Prev]: #if[Next]: #ifndef

PPWIZARD Manual
My whole website and this manual itself was developed using PPWIZARD (free preprocessor written by Dennis Bareis)
Wednesday October 04 2000 at 5:05pm