Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Compiler directive only for dev time
Message
De
18/09/2014 06:28:20
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
16/09/2014 15:08:17
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01607627
Message ID:
01607777
Vues:
69
>>>Hey all
>>>
>>>I am trying to execute a piece of code only at design time, never at runtime. I thought I could do a compiler directive. Something like
>>>
>>>#IF _vfp.startmode=0
>>>
>>>Of course, that will never work. Compilation is always at startmode 0, so it will be a hit in the exe. I guess it is possible to drive this by checking for the existence of a file? If the file is present, exclude the design time code?
>>>
>>>Thanks
>>
>>Will the Version(2) function work for you?
>
>That won't do it either. In fact, I drew a blank earlier trying to remember that trick. Version is not what comes to mind when I'm trying to figure out if I'm in the IDE or not. ;)

Things like that would work only if you compile standalone things (vcxes, prgs), which are not in the exe, from within the exe. But then these would have to be excluded from the project.

IOW, compilation exists outside of startmode 0, but then you've already created the exe... Though, trying to catch your own tail this way may be a healthy exercise, something like mental yoga.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform