Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing form properties by reference to a procedure
Message
 
À
30/11/1998 03:52:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00162339
Message ID:
00162504
Vues:
19
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform