Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using preprocessor directive when in IDE
Message
From
30/05/2008 08:05:10
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01320008
Message ID:
01320502
Views:
13
>>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.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform