Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning an Array from a Function
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00338850
Message ID:
00339057
Views:
31
This brings up an interesting point (at least to me).

The default behavior for parameter passing is by value unless specified. What happens when you pass an object to a function in the () like:
something = myfunc(myobject)

Is myobject passed by reference and therefore all the changes I make to it are reflected in the passed copy? Or do I have to explicitly pass it by reference using the @? Or do I have to return it after the changes are made?
myobject = myfunc(myobject) will effectively remake the object.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform