Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP60- Speed
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00412488
Message ID:
00412498
Views:
25
>Example 2 calls rgb() 6 times where example 1 calls it once, but you wouldn't notice the difference.

It's also multiple lines; I'd guess that in a big loop, it would take measurably longer, but it might take millions of iterations to be visible. It's a matter of readability.

I'd probably opt for the following, so that the RGB() function was called once; the principle argument in favor of this is readability, not performance:

WITH THISFORM
nRGB = RGB(192,192,192)
.optSecSold.Option1.DisabledBackColor = nRGB
.optSecSold.Option2.DisabledBackColor = nRGB
.optSecPurchased.Option1.DisabledBackColor = nRGB
.optSecPurchased.Option2.DisabledBackColor = nRGB
.optDivReceived.Option1.DisabledBackColor = nRGB
.optDivReceived.Option2.DisabledBackColor = nRGB
ENDWITH
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform