Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP code syntax coloring in HTML
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00355687
Message ID:
00361401
Vues:
37
>Duh! I was thinking the 30% was constant.

Nope, and I'm glad you brought this up. Optimizing these sorts of situations is, 99% of the time a good idea. I'll cite Obj2Bmp as an example of an instance where it really doesn't make the slightest bit of difference.

In order to create the bitmap, in 2 of the three color cases (16, and 256 colors), I needed to create what's known as an RGBQuad array defining the colors. 24 bit color bitmaps don't use one. The one for 256 colors was defined in a header file in the syntax #DEFINE WHATEVER CHR(N) + CHR(n1) +...etc. I used this for several reasons. One was the length of the string (1,024 characters). There was no way to do it in one fell swoop (line too long error would occur), so I had to break it up. The point, however, is that I only needed to access this value once per bitmap, not several times. So this was a case where, even if I could optimize it, it didn't seem to make much sense to do so.
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform