On 10/14/10 12:26 PM, J. Landman Gay wrote:
On 10/14/10 11:28 AM, [email protected] wrote:
About the constant command that Phil used in his process gadget. What does
it do that a variable does not? I see it cannot be altered in the same
handler, and I see that it can overRide a built-in constant, which might be
useful. Anyone ever come up with a compelling reason to use such a thing?
In Phil's example a variable would work just as well. I use constants more
often at the top of scripts.
Me too.
In the case of scripts, local variables have to be set at some point before
they will have a value, so I use those for things that are specific to the
user setup (file paths I'll need repeatedly, for example.) Constant values are
permanent until you change the script, so they're good for things that rarely
change, like version numbers, lists of related objects you need to loop
through often, and other script-related uses.
I almost never use constants inside a handler, but that's just personal style.
Me neither.
--
Phil Davis
PDS Labs
Professional Software Development
http://pdslabs.net
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution