Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MESSAGEBOX
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00365597
Message ID:
00365678
Views:
13
I guess we'll have to agree to disagree, then. :)

I'd much rather see:

IF X = 1 && Some explanation

Than:

IF X = ccSomeConstant

To me, that's more readable.

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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform