Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing parameters to a procedure in .PRG
Message
 
 
À
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:
01053381
Vues:
17
Hi Mike,

>
>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.
>

This is how I have it now, the procedure is the name of the .prg file. And you are right, it saves a line since I don't have to do SET PROCEDURE TO. Thank you for confirming that this is OK way to do it (I thought it would be "cleaner" to declare the procedure inside the .prg file).
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform