Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Microsoft C - <b>defined defined preprocessor operator</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
defined                  defined Preprocessor Operator

 defined(identifier)

    This preprocessor-only operator tests whether the identifier argument
    is currently defined as a macro. The expression evaluates to true
    (non-zero) or  false (zero). The operator is used with #if (instead
    of nested #ifdef or #ifndef directives).

      Notes:    The operator may occur multiple times in a boolean
                expression as part of the #if and #elif directives. For
                example, #if defined(VERSION3) && !defined(DEBUG) ...
                #elif defined(DEBUG) ...

                Any construct involving defined can be rewritten using
                #ifdef and #ifndef.

                Although defined is not a reserved word in C, it is
                strongly suggested you not use it as the name of an
                identifier.

See Also: #if #elif #ifdef #ifndef

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson