Actually, I'd like to rephrase this suggestion, as I think it's a good idea...

declaration of constants localized to the scope of the script.

example;

const %t = 7
on *:signal:test:{
echo 4 -a constant t is %t
}

This would be useful for script specific settings, without having to store global variables that are accessible to all loaded scripts, and vulnerable to /unsetall.

It would be nice if you could declare a bunch of %constants that would be accessible to all events and aliases, but inside that script alone. You would be able to modify the value of a %constant the same way you normally would with %var = value.

Constants would fit into the access priority as follows:

Local Variables, declared by /var command.
Local Constants, declared by /const command.
Global Variables, declared by /set command.

If you declared a Variable with /set, then all events/aliases in all scripts have access to it.
If you declare a like-named Constant with /const, then events/aliases in that script alone would have access to it instead of the Set Variable.
If you declared a like-named Variable with /var, then that event or alias alone would have access to it instead of the Const or Set Variable.

Does this make any more sense, or win any more favor?

The only downside to this, is that the script file would be in constant modification whenever a %const value is changed, and possibly make the file more prone to corruption in the event of a power failure. This presently holds true if you use #groups (/enable,/disable) in a script.

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!