On 10/14/10 11:28 AM, dunb...@aol.com 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.

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.

--
Jacqueline Landman Gay         |     jac...@hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to