>Proc1 passes variable1 to proc2 as parameter by value. Variable1 is declared public in main. Proc2 calls many other procs. One of those procs changes the value of variable1. Shortly after I (think it is when I actually return to proc2), get a VFP error messagebox "variable1 not found". If i go into the debugger, variable1 is no longer declared. What is up with that? Thought since the variable1 is passed by value that proc2 would have a copy and would not care if variable1 is then changed, but obviously I am wrong.
>
>Are my assumptions correct, anyone have any experiences with this?
>
Hi Brenda,
Are you sure you're passing by value? The default method of passing parameters to procedures (invoked with DO Proc WITH var) is by reference, although it can be overriden. The method of passing parameters to functions (invoked with return = Func(Var)) is determined by the value of SET UDFPARMS, the default being VALUE.
George
Ubi caritas et amor, deus ibi est