Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reverse a GUID? Fastest way?
Message
From
22/03/2008 11:23:34
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
22/03/2008 03:49:51
Thomas Ganss (Online)
Main Trend
Frankfurt, Germany
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01304506
Message ID:
01304562
Views:
20
>Hey Mike,
>
>>It's easy enough to take a string and reverse it...
>
>string reversing is actually tailor made for C.
>On short strings the effect will be not as marked as on bigger strings
>(copy allocation behaivour of memory vars)
>but AFAIR there is even a simple C-routine int he lowlevel examples (or used to be in the table...)
>
>If you are specifically after a certain length knwon before and want to stay in vfp
>for a first approximation I'd
>lcRev = Right(m.lcOld, 1);
>        + Subst(m.lcOld, 15, 1) ;
>        + ....; && a dozen more
>        + Subst(m.lcOld, 02, 1) ;
>        + Left(m.lcOld, 1)
>

That should work, but Carlos' approach with BINTOC seems to be ok for now.

>instead of a looping approach - and since this is an expression you can get rid of function call overhead with a nice xxxxxxxx approach a certain Mike described in a magazine<bg>.
>
>[Updated to be certain no article topic was possibly prematurely spoiled]

Thanks - much appreciated.
Previous
Reply
Map
View

Click here to load this message in the networking platform