Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reverse a GUID? Fastest way?
Message
De
22/03/2008 11:23:34
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
22/03/2008 03:49:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01304506
Message ID:
01304562
Vues:
19
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform