For Example:
Code: Select all
#MyStuff_ThreadSave=#true
xincludefile "mystuff.pbi"
Code: Select all
CompilerIf Not Defined(MyStuff_ThreadSave,#PB_Constant)
#MyStuff_ThreadSave=#false
CompilerEndIf
CompilerIf MyStuff_ThreadSave
debug "something slow but save"
CompilerElse
debug "something fast and dirty"
CompilerEndif
Code: Select all
#myconstant=1
DeclareModule test
EndDeclareModule
CompilerIf #myconstant
Module test
#myconstant=#True
CompilerElse
Module test
#myconstant=#False
CompilerEndIf
Debug #myconstant
EndModule
Code: Select all
#myconstant=1
DeclareModule test
Shared #myconstant
EndDeclareModule
Module test
Debug #myconstant
EndModule