Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ALLTRIM not trimming
Message
From
21/01/2010 10:29:05
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01445103
Message ID:
01445211
Views:
29
>>>>I just tried it in VFP 9 SP02 with the hotfixes applied and it works fine; try this:
>>>>
>>>>
>>>>lcTest = "Test" + CHR(160)
>>>>?IIF(RIGHT(lcTest,1)=CHR(160),.T.,.F.)    && Returns True
>>>>lcTest = ALLTRIM(lcTest,1,CHR(20),CHR(160))
>>>>?IIF(RIGHT(lcTest,1)=CHR(160),.T.,.F.)   && Returns False
>>>>
>>>
>>>Is this one the latest hotfix
>>>
>>>http://support.microsoft.com/default.aspx/kb/968409
>>>
>>>?
>>>
>>>Also, can anyone with or without hotfix confirm the behavior I'm seeing?
>>
>>I run the code above and get the results described above.
>>VFP9 SP2 09.00.0000.5815
>
>I see my error in the tests now - wow, what a stupid mistake.
>
>I was doing
>
>?alltrim(lcText, 1, chr(160)) and never assigned the result of alltrim back to the variable.

Happens to most of us
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform