Constant command
Ken Ray
kray at sonsothunder.com
Thu Oct 14 16:15:30 EDT 2010
> 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.
On other difference - constants can't be changed (an error is produced), so
it kind of acts like a "protected" script local.
Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
More information about the use-livecode
mailing list