>>If you want a switch which does not need a recompile and should depend on startmode, use:
>>
if _vfp.StartMode=0
>> ? "ide, interactive"
>>else
>> ? "the startmode is ",_vfp.StartMode
>>endif
>>
>>If you want a switch to start or not start debugger, which does not need a recompile and should not depend on startmode, use ASSERT in conjunction with SET ASSERTS ON/OFF.
>>
>>precompiler #IF is in fact okay for leaving out debug code from the exe version, but it's not that comfortable.
>>
>>Bye, Olaf.
>
>Thanks, Olaf. Used correctly it reduces the size of the exe which is what I think Dmitry is after.
But then this is the least productive way of reducing the exe size - the more advanced and more gainful techniques are to remove unused code; remove source from table structured code (scx, vcx etc); remove table structured code (recode all or most of scx/vcx as prg - I've seen size of the exe drop by 50% after that), apply compressing software.
Still, all of these techniques take a lot of time (including the #if - both branches need to be tested), and with today's hardware and bandwidth prices, is it really worth it? As an exercise, nice. Practical value, I doubt.