COHERENT manpages

This page displays the COHERENT manpage for #elif [Include code conditionally].

List of available manpages
Index


#elif -- Preprocessing Directive

Include code conditionally

The  preprocessing directive  #elif  conditionally includes  code within  a
program.  It  can be  used after  any of the  instructions #if,  #ifdef, or
#ifndef.

If  the conditional  expression of  the preceding  #if, #ifdef,  or #ifndef
directive is false (i.e., evalutates  to zero) and if the current condition
is  true (i.e.,  evaluates  to a  value  other than  zero),  then group  is
included  within  the program,  up  to  the next  #elif,  #else, or  #endif
directive.  An  #if, #ifdef,  or #ifndef directive  may be followed  by any
number of #elif directives.

The  constant-expression must  be  an integral  expression,  and it  cannot
include a  sizeof operator, a cast, or an  enumeration constant.  All macro
substitutions  are  performed upon  the  constant-expression  before it  is
evaluated.  All integer constants are treated as long objects, and are then
evaluated.  If constant-expression includes character constants, all escape
sequences are converted into characters before evaluation.

See Also

#else,
#endif,
#if,
#ifdef,
#ifndef,
C preprocessor,
defined
ANSI Standard, §6.8.1