Custom preprocessor constants

Monkey Forums/Monkey Programming/Custom preprocessor constants

Samah(Posted 2011) [#1]
Would it be possible for us to get custom preprocessor constants?
By this I mean:

#Define FOO = "bar"

#If FOO = "bar"
' code here
#End


And possibly an abbreviated version which defaults to "TRUE"

#Define FOO

#If FOO
' code here
#End

#If Not FOO
' code here
#End


If the constant doesn't exist, assume it is "FALSE", so the If Not FOO will pass.


dopeyrulz(Posted 2011) [#2]
To add to this I'd love to see Debug/Release preprocessor constants also.


skid(Posted 2011) [#3]
@dopeyrulz: I noticed this in mojo/graphics.monkey the other day:

#If CONFIG="debug"
...
#End



therevills(Posted 2011) [#4]
Cool - thanks Skid!




dopeyrulz(Posted 2011) [#5]
Ah - thanks Skid!