?NotDeBug
BlitzMax Forums/BlitzMax Beginners Area/?NotDeBug
| ||
Probably being stupid, I want to define a Const, that can have two different values , depending on if its a debug build or not.?Debug Const Cont1:int = DebugValue ? ?Release Const Cont1:Int = ReleaseValue ?Now obviously this doesnt Work, and I know I could make it a Global, set it as the release value then change it if its a bedug build. But this is just the example I am using to ask. How do I ?!Debug |
| ||
Looking at the bmk source you can probably add your own compiler directives. The directive definitions are in C:\Program Files\BlitzMax\src\bmk\bmk_modutil.bmx if you want to have a look. |
| ||
Watch out though - I had a play with compiler directives once before, and got in a mess. I think that some are in bmk, but some are in bcc, and some are in both! |
| ||
I have also tried to get some directives to work and simply fail. Mark seems to be right, that at least the keywords are reserved in the bcc, so currently the way to go with locals or globals instead of const.Local Test:String = "No Debug" ?Debug Test:String = "Debug" ? Print Test |