Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
C++ can speed up native VFP strings command ?
Message
From
21/11/2003 17:33:38
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00851950
Message ID:
00852515
Views:
9
> ... speed differences between STRTRAN() and CHRTRAN(). CHRTRAN()ing a
> character into a space is much slower than STRTRAN()ing a character into a
> space. I thought this was a clear bug, but I found out that the reason for
> this was that CHRTRAN() was not designed to change the length of the
> string, although it could, where STRTRAN() was coded to allow for this
> likelihood.

Garret, I think you mean CHRTRAN()ing characters 'away' (to nothing) rather than into different characters. I stumbled across this one myself and solved it by CHRTRAN()ing all but the first of the characters to be removed into the first character and then STRTRAN()ing that character to nothing. This was before I found the Fox newsgroups on Usenet or UT, of course. ;-) Recently I revisited the issue because I was looking at some very old library code and I wondered if it still applies ... But it seems that in VFP8 there is nary a difference between CHRTRAN() and STRTRAN() for removing characters.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform