Hi Albert,
>>
>
>What is confusing? It #defines in foxpro work just like they do in all of the other languages that use them (with the exception of case insensitivity). It is just compile time macro expansion. I would not worry about the behavior changing, it is standard now.
First, AFAIK no other language evaluates a
compile time constant at run time. That in and of itself leads to some confusion. Once evaluated at compile time, it is what is says, a constant and cannot be changed. In this case the value can be changed, which, by definition, makes it a variable. Second, one of the benefits of using compile time constants is that the reference to it doesn't have to be evaluated at run time, leading to improved performance. That's not the case here. Anytime a native function call is used in assigning a compile time constant, it is re-revaluated at run time. It doesn't matter if the function always returns the same value (i.e. REPLICATE("A", 5)) or not (i.e. SYS(5) + SYS(2003)). It's re-evaluated.
George
Ubi caritas et amor, deus ibi est