Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
REVERSE RGB(0,0,0,255,255,255) to RGB(255,255,255,0,0,0)
Message
From
13/06/2003 12:25:04
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00799797
Message ID:
00799855
Views:
39
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform