>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
if lOldSetExact="ON"
set exact on
endif
If it's not broken, fix it until it is.
My Blog