>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).
It used to be slower if you included the PROCEDURE line in the separate .PRG. I don't think that's a problem anymore. Leaving it out allows you the flexibility to rename the .PRG (and hence the function) to a different name by merely renaming the file.