Debuglog

Blitz3D Forums/Blitz3D Programming/Debuglog

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Well, the Debuglog becomes inactive so it's reasonable to assume there is no code generated.

Can we be sure? I suppose not. So let's try a quick test.
DebugLog "one"
DebugLog "two"
Stop

Create an exe with Debug mode turned off. Check the file size.
Now comment out one of the DebugLog lines and try again. File size is exactly the same.

This shows that there was no DebugLog code.

The remaining reference to DebugLog guards against the possibility the compiler doesn't generate code if DebugLog is never used.
I don't think Blitz does this sort of optimization, but it can't hurt to be paranoid.