-
Conditional Compilation
Is there any way to do "conditional compiling" within the BASIC source file? Or from the IDE? I'm thinking along the lines of how MPASM allows Conditional Assembly using DEFINES, IFDEF THEN, etc. to include or exclude certain lines of code.
I don't see anything in the PBP language, but is there some clever workaround that anyone uses? For example, if you need to compile the same source file for different PICs, you could just change a single define at the beginning of the file. Or in order to enable or disable certain functions within the code.
Jim
-
Just try this inside PBP:
DEFINE Switch1
@ ifdef Switch1
...
@ endif
and comment the DEFINE out if you dont want to compile the part.
This doesn't work for EEPROM-content.
-
Awesome! And it's simple too!
I'll give it a try very soon. Many thanks.
Jim