1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
// As logical operators there are '&' and '|' standing for
// logical AND and OR.
// They return arithmetic value 0 for false or 1 for true.
// Note that A and B are not handled bitwise but logical.
#if (A & B)
... // do this only if both A and B are true
#else // optional
... // do this only if both A and B are false
#elseif ( Cond ) // optional
... // do this only if both A and B are false and Cond true
#end
#if (A | B)
... // do this if either A or B is true
#end
#ifdef ( IDENTIFIER )
... // do this only if both A and B are true
#end
#ifndef ( IDENTIFIER )
... // do this only if both A and B are true
#end
#undef IDENTIFIER //
|