>In your sample: MyVar is private in LowerProc. But, because by default params are passed by reference to procedures (by value to functions), MyVar will be changed at the calling level. So, the params passing method is responsible for the change and not the scope of params. The MyVar variable will not change if:
>
>public MyVar, Myvar1
>Myvar = 12
>MyVar1 = 20
>
>do lowerproc with MyVar1
>
>In this case, at the calling level, MyVar will not change, MyVar1 will change.
>
>BTW, I will never understand why params are passed by reference to procs and by value to functions. Why this difference? Can anyone give a good reason?
>
>Vlad
>
>>I wonder if PARAMETERS is just enough to make a variable PRIVATE to only one PROC.
>>
>>public myvar
>>myvar = 12
>>
>>do lowerproc with myvar
>>do anotherproc
>>
>>
>>proc lowerproc
>>PARAMETERS myvar
>>myvar = 25
>>
>>proc anotherproc
>>? myvar
>>
>>Cetin
I bet a variable is NOT always private when passed as a PARAMETER if we are talking about older versions also.
Cetin