xsharp.eu • conditional compilation
Page 1 of 1

conditional compilation

Posted: Mon Aug 03, 2020 12:26 pm
by softdevo@tiscali.it
sorry i have a memory gap:
how do you say:
if I satisfy this condition it compiles this piece of code,
if I satisfy other condition it compiles another piece of code.
Thank you
Danilo

conditional compilation

Posted: Mon Aug 03, 2020 12:45 pm
by Chris
Hi Danilo,

See the following, if you include the #define, then the first part will be compiled, otherwise the second:

#define something

#ifdef something
...
#else
...
#endif

conditional compilation

Posted: Mon Aug 03, 2020 12:53 pm
by softdevo@tiscali.it
Thank you, I didn't remember it anymore