>Moving some basic computations to VFP. The basic SUBs declare the passed variables STATIC. In the Basic watch window, when the SUB is called the passed variables retain their original value when returning to caller. In VFP, the passed variables (at least in the watch window) retained values as assigned by the sub. Should I simply change the name of the received variables in the VFP procedures - or - is there a declaration that will emmulate the Basic STATIC guy?
>
>As Always
>Terry
Terry,
It sounds like a diiference between passing variables by reference and passing them by value. By default in VFP, if you usie the following syntax:
do someproc with xx, yy
You are passing the variables by reference. If you do this:
someproc(xx,yy)
you are passing them by value. Without monkeying with the SET UDFPARAMS setting, you can bypass this behavior by doing the following:
do someproc with (xx),(yy) - passes by value
someproc(@xx,@yy) - passes by reference
Because it looks like you want the variables passed by value, choose whichever method gets you there.
HTH.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao