Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Compiler directive only for dev time
Message
De
15/10/2014 10:06:28
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:
01609433
Vues:
73
>>It works OK, but I want it to not even exist in the exe at runtime. Only at design time.
>
>LOL!
>
>So you want MAGIC? :-)
>
>There's no way to have 'dynamic' conditional code inside of VFP (or any other language I know of) since the code is
>
>I don't understand why you wouldn't want the plain IF logic since that clearly works. The code in question would never be executed - why would you care if it's there.
>
>The alternative is to store the code you're trying to execute externally and run it only when your < debugCondition > is valid. But you still end up with a small block of code that is conditional.

Asking for magic is one way to get people to think outside the box. You did that exactly by saying have the code execute externally - only at dev time and not in the exe at all.

>
>Or simply:
>
>
>TRY 
>   DO DebugOnlyFile.fxp
>CATCH
>ENDTRY
>
>
>If the file is there it works, otherwise it doesn't.
>
>+++ Rick ---
>
>>>>Why not just pure IF?
>>>>
>>>>IF _vfp.startmode=0
>>>> ...
>>>>ENDIF
>>>>
>>>
>>>Borislav is right, just use the IF. I've already used this, and works ok.
>>>
>>>Regards.-
>>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform