>Believe me, it left me scratching mine when I first saw it, and yes, it goes against everything I thought I knew about compile time constants. If I were to hazard a SWAG, it looks like if a function call is used, we've got our old macro business going on. If literals are used, then I'd suspect they're treated like any other (normal) compile time constant.
The way I explain it to other programmers is, just imagine putting the value of the Constant in the procedure where its found. Basically doing a STRTRAN() on your PRG.
#DEFINE cdDATETIME datetime()
?cdDATETIME
wait window timeout 5
?cdDATETIME
Should give you two different times because when the code is compiled the "cdDATETIME" is replaced with "datetime()" and you get:
?datetime()
wait window timeout 5
?datetime()
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement