>>Could someone educate me as to why it is standard practice to define constants with a variable name rather than to just use the constant in the code?
>>
>>IE, why is:
>>
>>#define MY_CONSTANT "My constant"
>>? MY_CONSTANT
>>
>>better than
>>
>>? "My constant"
>>
>>
>>I understand that it may make it easier to change the value of the constant if the need arises during design, but if the constant is only used in one place in the application is there still an advantage?
>>
>>Thanks for any enlightenment.
>
>If it's used in one place then there is no need for it.
>But if you are planing big application then it's real advantage since you don't need look up for every place where is used but instead change it in one place and change happens everywhere.
AFTER a recompile!
Peter
Peter Cortiel