The private variables/parameters are visible in the called programs. The LOCAL variables/parameters are only visible in the program where they have been declared.
PRIVATE pcVar1
LOCAL lcVvar2
pcVar1 = "PRIVATE"
lcVvar2 = "LOCAL"
? pcVar1
? lcVvar2
DO myprg
PROCEDURE myprg
? pcVar1
? lcVvar2
RETURN
Also, as you correctly noted, LOCAL defines variable. The PRIVATE only hides variable if it existed before or does nothing if variable didn't exist. Any variable that get value assigned w/o declaration became PRIVATE in scope.
>Can someone give me a simple but clear understanding of the difference between LOCAL and PRIVATE? I've read the docs but they leave me unsatisfied. I understand that LOCAL actually creates a variable whereas PRIVATE does not. So is PRIVATE just a means to convert a public variable into a local one?
>
>Also LPARAMETERS vs PARAMETERS? One is LOCAL and the other is PRIVATE? I don't see the difference. Also, aren't variables created as LOCAL or PRIVATE by default without specifying? If so, what's the point?
>
>Thanks for any insights in this.
>
>- Don
--sb--