rc.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
#ifdef (1.2)
                                                      Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
 
                   The Resource Compiler #ifdef Directive
 
#ifdef name
 
The #ifdef directive controls conditional compilation of the resource file
by checking the specified name. If the name has been defined by using a
#define directive or by using the -d command-line option of rc, #ifdef
directs the compiler to continue with the statement immediately after the
#ifdef directive. If the name has not been defined, #ifdef directs the
compiler to skip all statements up to the next #endif directive.
 
Field  Description
────────────────────────────────────────────────────────────────────────────
 
name   Specifies the name to be checked by the directive.
 
Example
 
This example compiles the BITMAP statement only if the name "Debug" is
defined.
 
#ifdef Debug
BITMAP 1 errbox.bmp
#endif
 
See Also
 
#define, #endif, #if, #ifndef, #undef