Constant command

DunbarX at aol.com DunbarX at aol.com
Thu Oct 14 12:50:14 CDT 2010


Mark.

But script local variables do all that as well, no? It isn't a big deal, 
but except for the fact that these can replace predefined constants (a feature 
less available in LiveCode than in HC, especially as regards build-in 
functions) I still don't see the point.

Couldn't hurt to have them, though. And you would get an error if you ever 
tried to change one in the same handler, so that might be a check of some 
kind. Did I mention it was no big deal?

Craig
In a message dated 10/14/10 12:34:55 PM, m.schonewille at economy-x-talk.com 
writes:


> Hi Craig,
> 
> I don't know if it is compelling, but a constant is readily available to 
> all handlers in a script. If you have a library with functions and you don't 
> know which function will be called first, it is useful to not be required 
> to define a local variable in every function. Usually, I keep constants at 
> the top of a script, which makes it easy to adjust a script for different 
> customers or servers. Sometimes, I use a constant only because it is easier 
> to write, e.g. I consistently use dot instead of ".".
> 



More information about the use-livecode mailing list