Paskaler
Member
I've read somewhere on the forums that constant expressions will get evaluated at compile time, but I can't find the post and I'm unsure whether or not this is a GMS 2 only thing. I'd also like to add that I'm using the Early Access version of GMS in case it only exists there.
So, I have a macro defined DEBUG as true. If I change it to false, what would happen to code like this:
Will the compiler simply remove the entire thing, as there is no chance of ever running that code. I'm asking this since, up to now, I've had a weird obsession of adding debug code only when something breaks and removing it immediately after I fix the part that wasn't working and this means that there are times when I remove and the re-add the same debug code and this can get pretty annoying. So, basically, if this gets removed by the compiler, that means that I don't have to fix my silly OCD
So, I have a macro defined DEBUG as true. If I change it to false, what would happen to code like this:
Code:
if DEBUG {
show_debug_message( "hello" );
}