Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why define constants
Message
From
25/10/2006 17:28:40
 
 
To
25/10/2006 15:57:07
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01164235
Message ID:
01164584
Views:
7
>>>Only if you happen to be displaying the wrong message, otherwise it don't cares to the programmer.
>>
>>Or if your successor tries to understand the logic of the code.
>
>In that case, word "successor" has wrong roots... or maybe he is a true successor if he achieves success in understanding it :)


Well, this is probably the longest thread that I have ever launched. Thanks to all of you who participated. My original question was formed because of the difficulty (for a beginner at least) to read and understand code where you have to keep chasing other files and code blocks to understand what is going on. I'm again trying to teach some beginners, and providing them with code samples that come with VFP where they have to drill down (or up) several layers to find the code that's actually executing is a royal pain. If we in the VFP community really want to preserve the language, we need to do more to make it easier for a rank beginner (someone with no programming experience.) I am still fighting the VFP vs Access/VB battle constantly in my organization. (sorry for the lecture)

So I conclude from the discussion that there is no real consensus on the issue, and that if the messagebox text (for example) appears in only one place in the program, then it's generally acceptable to use a string literal rather than a defined constant.

Thanks again.
- Don
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform