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:
00365672
Vues:
10
>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 can see where a return value from a function documented in terms of a constant might be cause this sort of problem. For example, the Windows SDK defines the returns values with constants like ERROR_SUCCESS, ERROR_ACCESS_DENIED, etc. When debugging, seeing the actual value rather than the constant can be a problem. In the case of the Platform SDK, however, there is also a tool in Visual Studio that allows you to determine the meaning by simply entering the number.

In an instance like this, however, the use of the constants in the call and checking of the return value is far more meaningful than actual values themselves. I believe that, "If it ain't readable, it ain't maintainable". So the overall readability, in my mind, is enhanced by the proper use of defined constants.
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