Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replace command oddity - VFP3.0b for Windows
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00083511
Message ID:
00083514
Vues:
21
>The following works: replace junk.name with "test " + junk.name
>
>but this does not: replace junk.name with junk.name + " test"
>
>Why? Is this a bug, or is there something strange about the way VFP evaluates this expression.

Evan, there is no bug. It will work that way even in VFP5 :)
What happens with junk.name+"test" - the total lenght of the expression result exceeds the field lenght, and it gets truncated. Make expression as:

replace junk.name with alltrim(junk.name) + " test"
and you will see it (of course if the junk.name doesn't occupy whole field lenght.)

Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform