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.
#if (1.2)
◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
The Resource Compiler #if Directive
#if constant-expression
The #if directive controls conditional compilation of the resource file by
checking the specified constant expression. If the constant expression is
nonzero, #if directs the compiler to continue processing statements up to
the next #endif, #else, or #elif directive and then skip to the statement
after the #endif directive. If the constant expression is zero, #if directs
the compiler to skip to the next #endif, #else, or #elif directive.
Field Description
────────────────────────────────────────────────────────────────────────────
constant-expression Specifies the expression to be checked. This value is a
defined name, an integer constant, or an expression
consisting of names, integers, and arithmetic and
relational operators.
Example
This example compiles the BITMAP statement only if the value assigned to the
name "Version" is less than 3.
#if Version < 3
BITMAP 1 errbox.bmp
#endif
See Also
#elif, #else, #endif, #ifdef, #ifndef
♦