Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SETting Environment
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00457247
Message ID:
00457311
Views:
23
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform