>Hi Craig,
>
>>Pretty close to what I have said. I use no PUBLIC variables. ThisApp is declared PRIVATE in main.prg.
>
>In what case is a private variable declared at the main.prg different than a public ?
>Besides the case where you call this main.prg from another VFP application, but since this is (should) be rare I don't really see a difference.
>
>For the record, though I agree you should keep the number of PUBLICs to a absolute minimum, you might need some additional 'switches' that could have application outside the applic object. For example I've got a textbox which appearance is depended on such switch. The textbox could be used in GUI elements that starts before any applic object has been initialized. Think about a variable that holds the number of colours in the display settings. You might need that one to determine which graphic to display in the splash screen.
>
>Also think about my TAX RI builder which produces stored procedures where the RI rules can be overriden by two variables. You don't want these to be depended on a applic object.
>
>So there might be additional PUBLIC variables in your program that are used for the framework and do have application outside the scope of an applic object.
I propose to use g as scope indicator for variables that are declared public OR PRIVATE in the MAIN program. The g then indicates that it are GLOBAL variables. Global (g) is then simply an indicator that they're visible to the entire application. See also:
A Private Global Variable Thread #
669192 Message #
669192
Groet,
Peter de Valença
Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.