Problems with Logical Operators in GDL Preprocessing
Logical operators in GDL preprocessor conditionals are not currently supported, but they can be simulated.
Simulating the NOT operator
You might typically use the NOT operator as the following code example shows.
#Ifdef: symbol
--do this--
#Endif:
However, you should use the following code example instead.
#Ifdef: symbol
#Else:
--do this--
#Endif:
Simulating the AND operator
You might typically use the AND operator as the following code example shows.
#Ifdef: (symbolA *AND* symbolB)
--do this--
#Endif:
However, you should use the following code example instead.
#Ifdef: symbolA
#Ifdef: symbolB
--do this--
#Endif:
#Endif:
Simulating the OR operator
You might typically use the OR operator as the following code example shows.
#Ifdef: (symbolA *OR* symbolB)
--do this--
#Endif:
However, you should use the following code example instead.
#Ifdef: symbolA
#Define: TempSymbol
#Elseifdef: symbolB
#Define: TempSymbol
#Endif:
#Ifdef: TempSymbol
--do this--
#Endif:
#Undefine: TempSymbol