I was under the impression that 2 and 3 were reversed. Thanks for the info.
>Below are different options ordered by efficiency. I always start at the top and go down, if necessary
>
>1. Name expression
>2. Macro substitution
>3. EXESCRIPT()
>
>>Thanks Sergey, that's much cleaner than my attempt. Curious about something else now. You used macro expansion rather than EXESCRIPT. Any reason to prefer one over the other?
>>
>>>VFP9 has PRETEXT 8 value that eliminate new line characters. In VFP8 you'll have to use CHRTRAN().
>>>
>>>lcQtyFields = ""
>>>
>>>FOR I = 1 TO 10
>>>TEXT TO lcQtyFields NOSHOW TEXTMERGE ADDITIVE
>>>,QTY<<I>> int
>>>ENDTEXT
>>>ENDFOR
>>>
>>>TEXT TO lcTry2 NOSHOW TEXTMERGE PRETEXT 1+2+4
>>>CREATE CURSOR output (
>>> F2 C(<<LEN(pop.f2)>>),
>>> CITY C(<<LEN(pop.city)>>)
>>> <<lcQtyFields>>)
>>>ENDTEXT
>>>
>>>
>>>lcTry2 = CHRTRAN(lcTry2,CHR(13)+CHR(10),"")
>>>&lcTry2
>>>
>>>