Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing parameters to a procedure in .PRG
Message
De
27/09/2005 07:50:58
Mike Yearwood
Toronto, Ontario, Canada
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01053275
Message ID:
01053367
Vues:
20
Hi Dmitry

Name the PRG the name of the function (MyProcedure.PRG). Don't put a function or procedure line. Start with an LPARAMETERS line.

Call the function with DO MyProcedure or with x=MyProcedure() and you save a line of code because you don't have to SET PROCEDURE TO. You also don't have to DO MyProcedure in MyProc.PRG. The MyProcedure.PRG must be in the path until compiled into an EXE or APP.

>>
>>The first parameter is passed in anyway as logical false (.F.) but yes, it's good way to pass only second parameter, assuming that the first one never can be false(.F.).
>
>Thank you, Sergey.
>This is exactly what I was doing. And I wanted to be sure that I was not breaking something that will bite me later. Eventually I will change all my procedures to declared procedures. That is, I want to have inside the .PRG file something like
>
>FUNCTION MyProcedure
>
>This way I can pass parameters a more flexibly, I think.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform