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 11:34:57
 
 
À
13/06/2003 11:19:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00799797
Message ID:
00799833
Vues:
35
This message has been marked as the solution to the initial question of the thread.
What are your requirements? Completely reverse the order, or switch the two pairs of rgb() settings? I assumed switch the pairs...

Didn't see any advantage to using a loop to reconstruct:
local lcInside, laBusted, lcReturn
dimension laBusted[1]

oldval="RGB(0,0,0,255,255,255)"
lcInside = substr(oldVal, at("(",oldVal)+1)
lcInside = left(alltrim(lcInside), len(alltrim(lcInside))-1)

if alines(laBusted, lcInside, ",") = 6
	lcReturn = "rgb(" + laBusted[4] + "," + laBusted[5] + "," + laBusted[6] + "," + ;
	                  laBusted[1] + "," + laBusted[2] + "," + laBusted[3] + ;
	                  ")"
else
	error "invalid source string"
endif
? lcReturn>
>
Steve Gibson
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform