Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using TEXT - ENDTEXT
Message
From
06/01/2009 15:01:30
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01371436
Message ID:
01371481
Views:
12
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 
>>>
>>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform