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:
01428506
Vues:
65
Sergey,

>The recursive=.T. means that after every textmerge the result is checked for the text merge delimiters. If they are found, process repeats.

Ah, so if the called function for example returned a < < x > > that would get handled by a recursive call.

>It doesn't mean that function will ignore invalid or incomplete textmerge expressions as in your example.

But what I posted wasn't invalid nor incomplete, it was two perfectly fine nested replacement expressions. VFP just doesn't parse it smartly enough to find the correct matching pairs of delimiters.

Since the real thing I'm trying to do here is stored in field in the database and your solution is a little more obtuse looking and requires additional lines of code in the method I think I'll settle on using < < >> and {{ }} delimiters in the field. I suppose I can just always run a nested textmerge( textmerge( ,, "{{", "}}" ) ) because the inner won't alter the content if there are no brace delimited items.

>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 = [>>]
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform