Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Nested items in textmerge
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01428366
Message ID:
01428383
Vues:
73
Hi David,

The recursive=.T. means that after every textmerge the result is checked for the text merge delimiters. If they are found, process repeats.
It doesn't mean that function will ignore invalid or incomplete textmerge expressions as in your example.
To avoid the error replace delimiters with textmerge expressions so they are not processed on the first pass.
one = "test"
two = "123"
lcfield = "start<<d1>>callit('<< one>>', '<<two>>' )<<d2>>end"

d1 = [<<]
d2 = [>>]

x = textmerge( lcfield, .t. ) 
 
>Not sure I understand the usefulness of the recursive parameter in this function, attempting to next an substitution item inside another doesn't work:
>
>
>* spaces added after the < so the UT will post the message
>one = "test"
>two = "123"
>lcfield = "start< < callit( '< < one>>', '< < two>>' )>>end"
>lcx = textmerge( lcfield, .t. )  && error 36 barfs up
>
>function callit( lc1, lc2 )
>return lc1 + lc2
>
>
>If I use two separate delimiters sets and two calls it works:
>
>
>lcfield = "< < callit( '{{one}}', '{{two}}' )>>end"
>lcx = textmerge( lcfield, .t., "{{", "}}" )
>lcy = textmerge( lcx )
>
>
>Is there any way to do this with one call to textmerge()?
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform