Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MESSAGEBOX
Message
 
À
04/05/2000 11:14:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00365597
Message ID:
00366135
Vues:
15
>George, everyone,
>
>Ok, after all the dust has settled where do we stand on this?
>
>I can see benefits for both sides and problems for both sides.
>
>It seems to me that one of the driving forces behind defining constants is that they will be, well, constant. <g> In other words, across all of your applications the defined values will be the same. Less chance of oggfs.

Yep!

>However, with VFP we have to remember to put those constant declarations everywhere we need them so in this case I'm trading one kind of remembering for another.

To me it's more of a design problem than anything else. In C++, a code module has to declare its included files, which may include other header files. Further, in C++, where you have to define a variable and its type beforehand, the use of defined constants, reduces the number of variables you'd have to use. Further, if you work in multiple language environments, using a common set of constants (the MB_ ones for example), makes the transition from environment to environment easier, IMHO.

>What I would do is define my constants and place them into my oSys object, which as it is passed around makes the DEFINE values & names available for every routine.
>
>What about creating an oDEFINE object? Does this create more trouble than it solves?

I think Roi addressed this pretty well.
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform