In similar theme, this is a bit of code we use to make sure an app will NOT compile.
VB Code:
Option Explicit #Const TEST = True Sub BadFunction() #If TEST Then [COLOR=Red]Will not compile if TEST is true[/COLOR] #End If End Sub Sub ExampleFunction() #If TEST Then 'generate fake data for testing #Else 'get real data from the satellite #End If End Sub
Why?
We set TEST true to test applications in the IDE.
For instance we may generate fake data instead of getting data from instrumentation that is not connected.
Obviously it would be a disaster if somebody forgot to set TEST to false, compiled the app and it and sent it to a customer. This way they CAN'T compile it if they forget.




Reply With Quote