8.5. Boolean operators

A symbol works like a boolean. Either its defined or its not. The #if, #elif and #importif directives takes an expression that contains symbols and operators and returns either true of false. Here are some examples:

#if !DEBUG && !COMPLICATED
   // some stuff 
#endif

#if DEBUG || (X && Y && Z) || X==DEBUG
   // Note that you can also use parenthesis#

#importif DEBUG&&STANDALONE "UpstartWithDebug.asm"

Here is a list of operators:

Table 8.2. Preprocessor operators

Operator Description
! Negates the expression
&& Logical and.
|| Logical or.
== Returns true if the operands are equal.
!= Returns true if the operands are not equal.
() Parenthesis can be used to controll order of evaluation