Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Constants and SYS(5) + SYS(2003)
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00267724
Message ID:
00269004
Vues:
29
>Yes, it does, but with the caveats everybody's been pointing out here.
>
>George found a key to it when he RTFM (which of course I should have done too) and found the warning "Do not use system variables for eExpression. System variables are not evaluated until run time". But as Roi Ledford pointed out, SYS(5) and SYS(2003) are functions, not system variables, which latter are defined as "A variable that Visual FoxPro automatically creates and names with an underscore as the initial character." So as we've all concluded, the documentation is a bit vague on what's really going on here.
>
>You tested #DEFINE k_FILE File('test.tmp') and found it was evaluated at run time. I tested #DEFINE dcNow Datetime() and found that it is evaluated at runtime also. But I agree, it may not be wise to start relying on this behavior in case it changes in a future version of VFP.
>
>This has been an interesting thread. I don't know about you, but I'm going to keep on digging into this for a while.

Hi Rick,

I think I have an understanding of what's going on. Yes, I'm going to keep digging too, but in some other languages to see how they behave. My gut reactionn here is that if they're supposed to be compile time constants I'm going to treat them as such. It is tempting, however, to try to "trick" the system, butt I've leaarned over the years that it can get you into trouble. Thanks for the feedack.
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