Only Boolean Constants can be Used with #If Error

Only the Boolean constants TargetBigEndian, TargetLittleEndian, TargetMacOS, TargetMacOSClassic, TargetCarbon, TargetWin32, TargetMachO, TargetLinux, DebugBuild, TargetHasGUI, and RBVersion and RBVersionString can be used in the #if statement.


Example

A 'regular' Boolean variable cannot be used as shown here.

Dim b as Boolean
b= True
#if b then
  Beep
#endif

See Also

DebugBuild, RBVersion, RBVersionString, TargetBigEndian, TargetCarbon, TargetHasGUI, TargetLinux, TargetLittleEndian, TargetMachO, TargetMacOS, TargetMacOSClassic, TargetWin32 constants; #If statement.