Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Textmerge recursive
Message
From
11/02/2014 09:28:05
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
To
11/02/2014 07:29:16
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01593970
Message ID:
01593983
Views:
47
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform