Information générale
Catégorie:
Codage, syntaxe et commandes
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
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement