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 it is recommended that you use #ifdef and #ifndef commands where possible.
A common use of this command is as a method of creating block comments. Simply specify a variable you know does not exist!
[WhiteSpace]#ifdef VariableName
The "VariableName" specifies a variable that should exist for the test to evaluate to true.
#define Fred FredsValue
#ifdef Fred
...
#endif
#ifdef DoesNotExist
<P>This paragraph
has been commented out
as we are testing for
a variable we
know does not exist.
#endif