>>>If you recall PRIVATE scope is hierarchical - visible down from where a variable is declared all the way into child functions/methods called. LOCAL scope is local to the function the variable is declared at. So LPARAMETERS limits the scope of the parameters - where they are visible - to the function they are declared in.
>>>
>>>It has nothing to do with passing by value or by reference.
>
>Just to add to Rick's comments, what LPARAMETERS does is hide the variable from anything called by this routine. That is, the difference is relevant in this case:
>
>
>MyProc1(42)
>
>PROCEDURE MyProc1
>PARAMETERS nNum
>
>MyProc2()
>?m.nNum
>
>RETURN
>
>PROCEDURE MyProc2
>
>* Refer to nNum
>nNum = 37
>
>RETURN
>
>
>and:
>
>
>PROCEDURE MyProc1
>LPARAMETERS nNum
>
>MyProc2()
>?m.nNum
>
>RETURN
>
>PROCEDURE MyProc2
>
>* Refer to nNum without declaring it
>nNum = 37
>
>RETURN
>
>
>In the first example, nNum in MyProc1 is changed by MyProc2. In the second, it's not.
>
>Tamar
Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham