Skip to content

Latest commit

 

History

History
49 lines (30 loc) · 1.2 KB

-ifndef.md

File metadata and controls

49 lines (30 loc) · 1.2 KB
title description ms.assetid ms.topic ms.date
ifndef
The \ ifndef directive controls conditional compilation of the resource file by checking the specified name.
b83d7b0e-1a37-47a8-b495-0eab05ed3a9a
article
05/31/2018

#ifndef

The #ifndef directive controls conditional compilation of the resource file by checking the specified name. If the name has not been defined or if its definition has been removed by using the #undef directive, #ifndef 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 name is defined, #ifndef directs the compiler to skip to the next #endif, #else, or #elif directive.

#ifndef name

name

Name to be checked by the directive.

Example

This example compiles the BITMAP statement only if Optimize is not defined:

#ifndef Optimize
BITMAP 1 errbox.bmp
#endif

Related topics

Preprocessor Directives