Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Receiving parameter
Message
From
01/06/2006 03:03:16
 
 
To
31/05/2006 19:43:24
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01126192
Message ID:
01126394
Views:
18
>>>>>Hi all!
>>>>>I have 2 prg's called 'A' and 'B'. 'A' runs first and calls 'B' with a parameter. When 'B' has finished running, it has a returning value.
>>>>>I have no idea how to passed this value back to 'A'.
>>>>>Thanks,
>>>>>Tamas
>>>>
>>>>
* a.prg
>>>>lvReturned = b(param1, param2, param3)
>>>>
>>>>* b.prg
>>>>LPARAMETERS p1, p2, p3
>>>>...
>>>>RETURN lvRetVal
>>>>
>>>
>>>Thanks Sergey!
>>>Is it possible to use the 'do' command like this 'do a.prg with param' and receive the returning value?
>>
>>Yes it's possible to return a value(s) when using DO command. See http://fox.wikis.com/wc.dll?Wiki~ParametersByValueOrReference and http://fox.wikis.com/wc.dll?Wiki~ParameterObjects for more info.
>
>Thanks!!

In most situations, "DO x with b,c,d" and "=x(a,b,c)" are 100% identical. So if you need to return values, use "=x(a,b,c)" unless you have a good reason not to. On top of my head, I can not think of any situations where I could not use this solution.
Previous
Reply
Map
View

Click here to load this message in the networking platform