Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
REVERSE RGB(0,0,0,255,255,255) to RGB(255,255,255,0,0,0)
Message
De
13/06/2003 12:25:04
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00799797
Message ID:
00799855
Vues:
38
Didn't know about strextract()! I really need to upgrade from vfp6 :)

>Tracy,
>
>In this case code can be much shorter
oldval="RGB(0,0,0,255,255,255)"
>lcStr = STREXTRACT(oldval, "(", ")")
>lnPos = AT(",", lcStr,3)
>? "RGB(" + SUBSTR(lcStr, lnPos + 1) + "," + LEFT(lcStr, lnPos-1) + ")"
>
>>If I was an Ostrich, I'd stick my head in the sand right about now! :o) You are the first one to catch the obvious. I shouldn't be reversing the order at all, but switching the pairs as your example clearly does quite well. What was I thinking? (I obviously wasn't!) Thanks Steve!
Steve Gibson
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform