>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