General information
Category:
Coding, syntax & commands
I do not use public variables. I found it a good practice to avoid public variables with the introduction of Visual FoxPro 3.0, as you might re use them in some point of your program and give them a diferent data type or value and receive an unexpected result.
About two years ago I was given a VFP application that was created by another programmer. The client was complaining about "incorrect values" and the president of the consulting company gave the project to me to fix. This was an application for the Nuclear Energy Industry, and had critical values. The problem turned out to be 56 global variables were used. Objects were created and subclassed. Values of global variables which were declared in the main.prg were changed inside of parent objects and gave interesting results.
I have been paid well when I have had to correct another programmers mistakes.
Tom
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only