Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MESSAGEBOX
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00365597
Message ID:
00365665
Vues:
21
In this case, no, it really doesn't matter what the number is. But there are many cases when it does. I can't tell you how many times I've been trying to debug something in SBT and I've run into the problem of having to go hunt down the value of a constant. It's a real PITA.

Michelle


>I hate to go against the grain here, but, from my POV, remembering MB_ICONSTOP is easier than whatever it's real value is. Further, the use of header files also makes it easier to change a particular reference that may exist in multiple programs. It's true too, but a minor consideration that the use of compiled constants reduces the overall compiled size of the module.
>
>I think part of the problem (and Michelle mention this) is that we want to know what the value is. Well, from my perspective...
>It doesn't matter what the value is!
>What is most important, IMHO, is what it represents. It's an abstraction. I've used headers in a number of places, especially as a series of flags stored in an integer. I don't want to have to remember that 1 is one condition, 2 is another, 256 is something else. Looking at the name constant, however, gives that information. If I see that 16 is passed to MESSAGEBOX(), I may not (or more importantly someone else), know that it's the stop sign. MB_ICONSTOP tells me that immediately.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform