newtofoxpro
Programmer
Possibility no no. I want to know best practices.
Small procedures which needed frequently in various places in the project, I kept in MainProc.prg & set proc to MainProc.prg in main prg.
PROCEDURE myDate
PARAMETERS InMyDate
RETURN DMY(InMyDate)
? MyDate(date())
Another way, define Main class & add these procedures and use them.
? Main.MyDate(date())
In case of MainProc.prg, I found that vfp search path is Main.prg,MainProc.prg,Current.prg,BacktoexecutionChain (Pls correct if wrong)
In case of Class, Class definition is in vfp's memory. Udf can execute faster. (Pls correct if wrong) But may be increase memory consumption.
Sorry, if already answered.
Small procedures which needed frequently in various places in the project, I kept in MainProc.prg & set proc to MainProc.prg in main prg.
PROCEDURE myDate
PARAMETERS InMyDate
RETURN DMY(InMyDate)
? MyDate(date())
Another way, define Main class & add these procedures and use them.
? Main.MyDate(date())
In case of MainProc.prg, I found that vfp search path is Main.prg,MainProc.prg,Current.prg,BacktoexecutionChain (Pls correct if wrong)
In case of Class, Class definition is in vfp's memory. Udf can execute faster. (Pls correct if wrong) But may be increase memory consumption.
Sorry, if already answered.