Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bug in RGB() function
Message
De
26/06/2015 01:04:44
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Bug in RGB() function
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01621469
Message ID:
01621469
Vues:
105
Either I am missing something or there is a significant bug in the RGB function.

The value of RGB((204,198,149) is returned as 9815756. In hex this is #95C6CC.

That is completely wrong. The value of RGB(204,198,149) is 13420181. In hex that is #CCC695.

I finally figured out the problem: any time the first number was > 99, the RGB() function is returning the number of the RGB in _opposite_ order! IOW the value of RGB(204,198,149) should be 13420181, yet VFP returns 9815756. However doing the RGB backwards, as in RGB(149,198,204) results in the correct decimal for the original order: 13420181.

VFP is reversing the parameters, seemingly randomly, but I ran that RGB on 3 different PC's and it always came up the same wrong answer.

Anybody know anything about this?

TIA
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform