>Subject: Re: Some discussion about Palm Programming >From: DIAMOND JEFF <[EMAIL PROTECTED]> >Date: Wed, 21 Feb 2001 15:19:10 -0500 >I agree -> nearly all programming methodologies use global >variables - they just dress them up, such as making them static >members of classes with access functions. Actually the technique of static variables with function-based access is more that just "dressing up". Hiding or protecting your 'global' variables by only providing access through functions is very smart programming. It increases readability, stability, maintainability, extendability and several other '...abilities' I can't think of right now. You can also initiatilize a static variable on program load. You can also modify the nature of the variable, add conditional validation to its access and use. Because of all this you don't need to use "global" variables, and can instead use static variables with global access. And this technique doesn't require classes (or C++), and is a routine C language capability. Roger Stringer Marietta Systems, Inc. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
