MergeScript problem

Topics: Developer Forum
Developer
Nov 9, 2013 at 1:19 PM
To handle multiple nested mergeScript()s, we need to change 'Private' to 'Local' in the following code. ( i.e ActiveVFP.MergeScript).

Otherwise, value of strVar is not 'hidden' and you may think that it almost behaves like a public variable. However, it is a problem in code only, when you trace this problem out.
cEval = "Local strVar"+CHR(13)+"TEXT TO strVar TEXTMERGE NOSHOW"+CHR(13);
 + STRTRAN(lcStr,"%>",CHR(13)+"TEXT TO strVar TEXTMERGE NOSHOW ADDITIVE"+CHR(13)) + ;
                CHR(13)+"ENDTEXT"+CHR(13)+"RETURN strVar"