Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Variables
Message
 
À
15/01/2007 09:02:26
Dorin Vasilescu
ALL Trans Romania
Arad, Roumanie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01185594
Message ID:
01185599
Vues:
14
>>Hi There,
>>
>>I was wondering if some one could help me with a variable problem. How do I pass on a variable (lddate) value from an event to a method.
>>
>>Thanx for the help
>>
>>Bilal
>
>Make it PRIVATE or pass it as parameter

If your referring to having a value, calling a method or event and that method or event changes the value, and you want the NEW value returned you could do a few ways.... pass variable by reference, or have the method or event return the new date value...
ldMyDate = ctod("1/15/2007")
ldMyDate = This.SomeMethod( ldMyDate )  && simple pass of variable
This.SomeMethod2( 10, @ldMyDate )  && pass by reference


function SomeMethod
lparameters pdDateParameter

pdDateParameter = pdDateParameter + 7  && ex: add 7 days..

return pdDateParameter

*/ This one passed by REFERENCE to date variable
function SomeMethod2
lparameters pnDays, pdDateParameter

*/ Passed by parameter actually changes variable at
*/ ITs memory location... no need to RETURN a value
pdDateParameter = pdDateParameter + pnDays

return
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform