Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Arguments passed by Value & Reference????
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00613697
Message ID:
00613734
Views:
10
>A .Net book Im reading states that variables are passed by 'value' and objects are passed by 'reference' when used as an argument.
>
>Can someone explain the difference in VFP terms?
>
>Thanks,
>
>Todd

This is the same in VFP.

For example, if you call a UDF with something like this:

In the calling method:
myVal=4
z=MyUDF(myVal,this)
In MyUDF:
LParameters TheVal, TheObject

* the first param is a value
* the following line do not change the value in the calling prog
TheVal=5

* the second param is an ref to an object
* the folowing line affect the object in the calling prog
TheObject.left=50
HTH :-)
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform