Mike Yearwood
Toronto, Ontario, Canada
Versions des environnements
Network:
Windows 2008 Server
>>PMFJI....I think "most" of the time, PUBLIC/Global variables aren't necessary.
>>
>>But I'd stop short of saying 100% of the time.
>>
>>I don't think they were necessary in the example where Mike Y provided a nice clean solution - but instances where you have scalar values that need to be visible across the entire app are served by a global setting (e.g. Company Name, current user signed on, etc.) In most .NET apps I had a global class of properties for such values.
>>
>>Just my 2 cents
>
>I agree. if you have a global setting global/public variables are fine.
I can make a "global/public" just by using private in the main .prg of an app. Avoid public and you will learn there are better alternatives.
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