Gustav Brock
gustav at cactus.dk
Wed Sep 21 16:13:02 CDT 2011
Hi Ken You make it sound as if global variables happen to be changed by magic. They don't, because you - the programmer - decides what (and not who) can set the value and when. Since when have developers lost control of a well-designed application? If nothing can change a global variable (or a static or set a property or call a set method) what should its purpose be? Use a constant in that case. /gustav >>> kismert at gmail.com 21-09-2011 21:16 >>> > > Stuart McLachlan: > > As a general rule, Global's should be set in only one place, but can > read/used anywhere. > I think the interesting question is not where a global is set, but by whom. If it is not simply read-once, how do you ensure the right party gets to set the globals? They should not be used to carry values which can be modified > indiscriminately... > But what if you need to modify globals? What do you do then? It is hard to write a real Access app that doesn't require global parameter passing, which requires changing globals. -Ken