Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Receiving parameter
Message
De
01/06/2006 03:03:16
 
 
À
31/05/2006 19:43:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01126192
Message ID:
01126394
Vues:
13
>>>>>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform