Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Possible VFP7/8 ER: Integrate Crystal Reports
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00495582
Message ID:
00496608
Vues:
13
>>>#DEFINE MACHINE_NAME SYS(0)
>>>#DEFINE CURRENT_DEFAULT_DRIVE SYS(5)
>>>
>>>Uhh, George, think about these for a minute...
>>
>>What?? Didn't we have a discussion sometime back that defined function calls like these are actually evaluated at run-time not compile time? As a matter of fact, I remember testing something like in a EXE and being quite surprised at this. Or is it something else?
>
>Geo,
>
>You're not starting that thread back up again are you? < gd&r >. I think the concensus was that it confused the crap out of everyone <s>. I ended up doing this:
>
>
#DEFINE MACHINE_NAME 0
>#DEFINE CURRENT_DEFAULT_DRIVE 5
>
>?sys(MACHINE_NAME)
>?sys(CURRENT_DEFAULT_DRIVE)
>Same thing just doesn't confuse anybody <g>.

No, Roi, I wouldn't dare start that up again.< s > Actually, what you propose is probably a very good idea. Let's assume that the behavior changed and the #DEFINEs became real compile time constants. What would happen to in my example? Code break. Fall down. Go Boom! In your's it wouldn't.
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