Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
Bug in RGB() function
Versions des environnements
Network:
Windows 2008 Server
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement