Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
#DEFINE - Why?
Message
De
31/03/2008 17:47:45
Mike Yearwood
Toronto, Ontario, Canada
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01306848
Message ID:
01307173
Vues:
10
>>>>Declared PRIVATE in the main program does allow it to be available throughout the app. Or make it a project level property on an object. You could even call it oProject.Constants.My_Constant if you wanted.
>>>
>>>This leads us to another interesting point. Variables and properties can be changed. The defined constants can only be re-defined using #UNDEF directive first.
>>
>>Someone else said that too. It was the only point that I've seen so far that gave the DEFINE any real value to me, but I don't know if it's enough to use them instead of variables. If there are a couple hundred variables in your code, what's adding 20 more? I would rather have them all defined in the same place anyway.
>
>I think Craig explained it better in the previous message.

Don't forget that with an object property you can put an assign on it to prevent it being changed. So it would be similar to a constant, but introduce even more overhead in terms of ram and time to access.

>
>I'm sorry, was working <g>
>
>Very unusual for me, I understand.

If that was a joke, I congratulate you. Having the strength to laugh off old hurts shows healing!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform