Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing form properties by reference to a procedure
Message
 
To
30/11/1998 03:52:43
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00162339
Message ID:
00162504
Views:
20
Hi Yves,

>Normally by default arguments are passed to procedures by reference, or is this different when the passed arguments are refering to object properties.??

Exactly. Properties are always passed by value, never by reference, because they are considered to be part of a whole. In order to access a property you always have to use a reference, it's a two-step-process: first reference, then property. That's by design, as Microsoft would say, and in an OOP world does actually make sense.

If you have an existing function that has outgoing parameters, you need to transfer them in a local variable, pass that variable and store the new values back into the property.

One of the next issues of Ask Advisor deals with the issue of passing parameters by reference and by value.

Christof
--
Christof
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform