Information générale
Catégorie:
Codage, syntaxe et commandes
>>Chewing it over, I agree with your sentiments George. Compile time is compile time. I just tested #DEFINE k_FILE File('test.tmp') and it too evaluates at run time. I would expect a constant - and I don't think I'll start taking "advantage" of this behaviour, because, to me, it's counter intuitive, confusing, and they might "fix" it at some future date.
>
>Hi David,
>
>I agree totally.
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.
I just wish that the #ifdef, etc. worked in the header files and that parameter passing (eg. #define MAX(a,b) iif(a>b,a,b)) was supported.
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