Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Textmerge recursive
Message
De
11/02/2014 09:28:05
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01593970
Message ID:
01593983
Vues:
46
This message has been marked as a message which has helped to the initial question of the thread.
>Consider this code:
>
>LOCAL lcTest
>lcTest = "<<lcTest2>>"
>*
>LOCAL lcTest2
>lcTest2 = "Hello World"
>
>TEXT TO lcOutput1 TEXTMERGE NOSHOW
>What I say:
><<lcTest>>
>Good bye.
>ENDTEXT
>
>MESSAGEBOX(lcOutput1) &&displays <<lcTest>> literally.
>
>LOCAL lcOutput2
>lcOutput2 = TEXTMERGE(lcOutput1,.T.,"<<",">>")
>
>MESSAGEBOX(lcOutput2) && Displays Hello World.
>
>
>I wonder if there a way to have the first Textmerge evaluate the string lcTest recursively?

If you prefer the multiline layout, then omit the textmerge clause when creating lcOutput1, and then call textmerge() with recursion. I think you can even expand a function call which may return a text with embedded merge placeholders... you can do pretty much anything except doing textmerge within textmerge (because there seems to be some kind of handle and there's only one of it). The only way to recurse is to call textmerge() function with the recursive parameter.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform