Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Constants and SYS(5) + SYS(2003)
Message
 
À
24/09/1999 12:54:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00267724
Message ID:
00268606
Vues:
37
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform