Compiler Directives

jscoulter

Member
Licensed User
Longtime User
I was wondering how hard it would be to add compiler directives to B4A ?
I was thinking, and excuse me if I am being naive, but when your parser is converting the VB code to I assume Java, or whatever you do behind the scenes, if it saw say


//Log(“This is a test”)

and somewhere you have an option, “remove debugging code” it would skip this line of code if the “remove debugging code” was true, and if it was false, it could ignore the // (or whatever you defined as the directive markup) so it still gets included in the code.

Its just a thought. To ”me” it seems straight forward enough, but then I did not write B4A nor know its inner workings

I am happy to test if you decide to try it.
 

francoisg

Active Member
Licensed User
Longtime User
Can I second the idea of compiler directives?
I would like the ability to set a compiler directive and conditionally compile in some code and exclude others (debugging url for example).

This would make it easier for us to compile and test while developing / debugging but the remove the debugging code by setting a compiler directive.

thank you for an innovative product!!!
 
Top