Home > database >  VFP parameter passing for subprocesses argument constants and form the problem of parameter
VFP parameter passing for subprocesses argument constants and form the problem of parameter

Time:11-22

The main program
Store 1 to x, y
Do a1, with 2 x
? X, y
Return

A subroutine a1..prg
Para x, y
X=100
Y=200
Return

According to the argument form a corresponding CanYi originally, 2 is a constant, pass by value, x is a variable, according to the address,
After running y there is nothing wrong with the final result is 1, why is x 2?
Transmission should be parameter y according to address one by one back to the argument x? Parameter y is 200, in the process of the child back to the argument should not be 200 x? Why is the last 2? For bosses to explain
There is, I try to focus on the parameter and argument away all their parameters, finally is 200 and 1! Don't change the position changed value?
  • Related