Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using TEXT - ENDTEXT
Message
De
06/01/2009 15:01:30
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01371436
Message ID:
01371481
Vues:
13
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 
>>>
>>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform