#if
Begin
Conditional
Compilation
#if
Syntax
#if
<constant-expression>
Description
The lines
of
code between
#if
and
#endif
or #e/se
will
appear in the
output
if
and
only
if
the constant-expression evaluates
to
a non-zero value. All
bi-
nary non-assignment C operators, the
7:
operator, the unary -,
],
and!
op-
erators
are
all legal in constant-expression. The precedence
of
the operators
is
the same
as
in the definition
of
the C language. There
is
also a unary
operator
called defined,
which
can be used in constant-expression in these
two
forms:
defined(
<nameĀ»,
or
defined
<name>
This allows the the
utility
of
#ifdef
and
#ifndef
in a
#if
directive. Only these
operators, integer constants, and names
which
are
known
by GSPCPP
should be used in constant-expression. In particular, the sizeof operator
is
not
available.
C-5