Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing parameters to a procedure in .PRG
Message
From
27/09/2005 07:50:58
Mike Yearwood
Toronto, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01053275
Message ID:
01053367
Views:
11
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform