2 Replies Latest reply on Feb 19, 2013 11:16 AM by user_14586677

    Global vs Local Variables


      Having recently discussed the use of global and local variables with Dana, I could not help but writing a bit of explanation for those who are not so experienced in the matter. Have a look at the attached document.




      Happy new year for all you forum supporters



        • 1. Re: Global vs Local Variables

           Thank you so much!  -Robyn

          • 2. Re: Global vs Local Variables

            Bob and I discussed pros and cons of Globals.




            I use in some programs extensively globals, and use pointers


            to them. Pariculary in cases where code space is challenged,


            or execution speed. You define them once, they do not get pushed/


            pulled on stack operations, just the pointers.




            Note however this works great in reducing code size where native


            machine size is 8 bit, and you have many ints and longs, especially






            I think collectively we should do a sticky Globals vs Locals thread,


            get everyones input, and put it in an ap note.




            Regards, Dana.