- Home /
help understand @if false
hello
in some code i saw #if false #endif, i already looked in internet for a meaning of it, i know that is a preprocessing directive and i know how to use #define but i didn't get what #if false do... anyone can help me?
Comment
Best Answer
Answer by Iarus · Feb 02, 2020 at 09:23 AM
#if some_condition
DoStuff();
#endif
If the condition is true, the code will be compiled, if it's false it won't be compiled, meaning it won't exist at all when running the game.
#if false
DoStuff();
#endif
Means, dont ever compile this. It's the same as commenting the code:
//DoStuff();
thank's you, so when i'm going to write #if false i'm going to just say "don't compile from here", thank's you i got it!