>Why are you arbitrarily storing multiple procedures/functions in a single .prg? This does not help the compiler. If you build separate .prgs per function the exe will run them faster, than if it has to dig into other files first.
another myth,
Consider:
SET PROCEDURE TO MyFunction3
nSec = SECONDS()
FOR nT = 1 TO 1000000
x = Myfunction()
ENDFOR
? "Myfunction, same proc file", SECONDS() - nSec
nSec = SECONDS()
FOR nT = 1 TO 1000000
x = Myfunction2()
ENDFOR
? "Myfunction2, seperate Prg", SECONDS() - nSec
nSec = SECONDS()
FOR nT = 1 TO 1000000
x = Myfunction3()
ENDFOR
? "Myfunction3, set procedure", SECONDS() - nSec
WAIT window
FUNCTION MyFunction()
RETURN .T.
Outcome (ran as EXE) :
Function in the same source file 0.2 seconds for 1 million calls
Function as PRG exactly the same: 0.2 seconds for 1 million calls
Function as part of procedure file using SET PROCEDURE: 0.185 for 1 million calls.
There is ABSOLUTELY NOTHING to gain performance wise to split function up into procedures.