Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Variables
Message
 
To
15/01/2007 09:02:26
Dorin Vasilescu
ALL Trans Romania
Arad, Romania
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01185594
Message ID:
01185599
Views:
11
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform