Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Constants and SYS(5) + SYS(2003)
Message
De
23/09/1999 21:45:41
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00267724
Message ID:
00268339
Vues:
27
>>>>In my H-file, I have the following:
>>>>#DEFINE		DEFAULT_APP_TREE	SYS(5) + SYS(2003)
>>>>#DEFINE		DEFAULT_DRIVE		SYS(5)
>>>>I fairly certain this is working correctly, but I am looking for some re-assurance. When I compile, the SYS(5) + SYS(2003) is being substitued for all occurrences of DEFAULT_APP_TREE as opposed the current evaluation of SYS(5) + SYS(2003). Right? In other words, on my development machine, this would evaluate, at runtime, to D:\Apps\DFS. On my users, it could evalute to C:\Apps\DFS.
>>>>
>>>>TIA!
>>>
>>>Hi Mark,
>>>This will only work at compile time, on your machine. So the users will see your settings, d:\apps\dfs
>>
>>Hi David,
>>
>>I've tested this on my machine running an EXE outside the development environment. The answer appears to be that the constant is re-evaluated at run-time. My test showed the current directory, not the one the exe that was the current default when the exe was compiled. Frankly, I thought the same way you did, but apparently, this isn't the case.
>
>George, I ran a similar test using an FXP and can confirm your results. Like you, I would have thought that the values would have been established at compile time, but they do in fact appear to be re-evaluated at run time. Of course, by using an FXP I had to run from within VFP, but I made the PRG unavailable during the second run so I know it wasn't getting recompiled.

OK, it does make some sense, the string "SYS(5) + SYS(2003)" must be getting compiled into the fxp. Does this open up some interesting possibilities?? (rhetorical ?)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform