General EQWatcher Concepts > Venturing into the Unknown  > Constants


An EQWatcher constant is a string value that cannot be changed, hence being constant.  Numbers can be considered constant as well, but since it's silly to use a 32-bit number to reference another 32-bit number, they are used directly instead.  See the Identifiers section for information on constant numbers.  Constants are used similarly to variables, but are limited in that they may not be modified. 

A constant is defined as follows:

constant [name] "[data]";

For example:

constant Super "Supercalifragilisticexpialidocious";

This example would allow you to use the word Super instead of typing out "Supercalifragilisticexpialidocious" each time.

All strings used in EQWatcher Advanced script commands are converted to constants whether they are defined this way or not.

The EQWatcher Advanced script compiler allows the use of control characters if you wish to use a quote character in your string constant, as well as for using the control character itself.  \" directs the compiler to insert a quote, and not treat it as the end of the string.  Therefore "\"Hello\"" makes a constant with the data ""Hello"".  \\ directs the compiler to insert a single backslash.  Therefore "C:\\program files\\eqwatcher\\" becomes "c:\program files\eqwatcher\"