See my reply to Nadya.
>>What is the simplest explanation as to why these are needed? Why not just set regular variable values? So what if they are constant and don't change?
>
>One reason is that a variable needs additional overhead.
>
>
>x = 5
>
>* or:
>
>#define SOMENUMBER 5
>x = SOMENUMBER
>
>
>are both equivalent; in this case, the number is first assigned directly.
>
>
>local lnSomeNumber
>lnSomeNumber = 5
>...
>x = lnSomeNumber
>
>
>In this second example, not only does the variable lnSomeNumber need extra space (a slot in the variable table, I think, although I am not quite clear about all the technical details), but every time it is accessed, the variable must be looked up.
>
>Other languages work different in this respect; so there is not so much difference between "constants" and "variables", but for safety, a variable may be declared as unchangable.
>
>By the way, that should be another reason to use constants. A variable can be assigned any value at any moment. A constant is supposed to be treated as constant. Oh well, you could re - #DEFINE in another part of the program. Sigh.