Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error : Illegal redefinition of variable
Message
De
24/07/2013 17:38:37
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
24/07/2013 09:36:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01579124
Message ID:
01579178
Vues:
52
>>>>>PUBLIC oldproduct, oldrinward, sale2edit, sale2add, zuretval, oareacode, oareaname, osmancode, osmanname, oaccode, oacname, ocompcode
>>>>Dont use Public!
>>>>And if you cannot avoid
>>>>than dont use them
>>>There is NOTHING wrong with using PUBLIC, Koen. There are probably better ways to code than using
>>>PUBLIC, but it is perfectly legal and will work correctly, and in some cases is the only way to accomplish
>>>something.
>>
>>There is little BENEFIT to PUBLIC. By avoiding it, programmers will learn the better ways to code.
>
>
>Such a comment conveys a lot of assumptions. It also negates the fact that there are dozens of scenarios where PUBLIC is not only desirable, but the most efficient solution. There are always other ways to code things, but sometimes simpler is better. Each component has its place, and learning the conditions surrounding when to use each is what makes a programmer learn better ways to code.
>
>FWIW, Visual FreePro adds the concept of "thread globals" which are public definitions visible only to the current thread, called TPUBLIC or TGLOBAL.
>
>The right tool for the right job. Right? Sometimes PUBLIC is most desirable, and my response to Koen was to his comment "don't use public," which I do not believe is good advice as it immediately shuts people off to the idea of ever using a PUBLIC definition, when using PUBLIC definitely has its place.

That does not mean use every tool. Name one time where public is the most desirable. There is one assumption that should be conveyed to you. If you are advising someone who cannot debug this problem on his own, then you should not be advising him to use public.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform