Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SETting Environment
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00457247
Message ID:
00457311
Vues:
27
>Why do I get a syntax error for this?
>
>**Setup.prg
>PUBLIC gcExclude
>gcExculde = SET("EXCLUSIVE")
>SET EXCLUSIVE OFF
>
>
>**Cleanup.prg
>SET EXCLUSIVE (gcExclude) <--- This is where I get a syntax error, why?
>
>
>p.s. these are just snippets from each of the respective programs.
>
>Thanks
>
>Elgin

Elgin,

Are you sure, you want use public variables for these settings? If they are defined in main program, you can use private variables instead. Better yet, make these settings to be properties of your application object. Then, in object destroy you can restore your settings back to original. BTW, I usually use this syntax:
local lOldSetExact
lOldSetExact=set('exact')
set exact off
***** Other code *******
if lOldSetExact="ON"
   set exact on && Avoid macro, if possible
endif
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform