Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning value from a Method
Message
From
06/02/2007 07:34:13
 
 
To
05/02/2007 20:47:03
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01192623
Message ID:
01192709
Views:
13
>>Question: can I return a value from a Method? If so, how would I reference the returned value?
>
>Several ways to return a value -- if only single value, then you can use the method by Dan Freeman. You can pass the parameters to the method by reference:
>
>
>MyVar1 = ""
>MyVar2 = 0
>thisform.MyMethod(@MyVar1, @MyVar2, ...)
>...
>? MyVar1
>? MyVar2
>
>
>the @ sign passes the parameter by reference, any value assignment in the method is returned to the calling program. You can also pass an object with properties:

Don't forget you can equally pass params by value:

lcFirstName = thisform.ParseFirstName( lcFullName)

...
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Reply
Map
View

Click here to load this message in the networking platform