*merging function getlettercaption lparameters lpnscript_id local lcreturn use scriptfile in 0 order script_id shared if indexseek(m.lpnscript_id,.t.,'scriptfile','script_id') ; then m.lcreturn = textmerge(alltrim(scriptfile.mg_script)) else m.lcreturn =[] endif use in scriptfile return m.lcreturn endfunc &&getlettercaption * get default caption function getdefaultcaption use sysfile in 0 shared local m.lcreturn m.lcreturn = getlettercaption(sysfile.dft_cap) use in sysfile return m.lcreturn endfunc &&getdefaultcaptionThen I have a prg which calls function getdefaultcaption() like as follows:
set textmerge on LOCAL lcfile m.lcfile = SYS(2015)+".txt" _text = FCREATE(m.lcfile) SET TEXTMERGE ON TEXT noshow *some code <<getdefaultcaption()>> *some more code ENDTEXTThe end result was that I get two lines of letter caption instead of one, for example,
"Do not let any unwholesome talk come out of your mouths,
but only what is helpful for building others up according to their needs,
that it may benefit those who listen."
- Ephesians 4:29-30 NIV
Dare to Question -- Care to Answer
Time is like water in a sponge, as long as you are willing you can always squeeze some.
--Lu Xun, Father of Modern Chinese Literature