< Previous | Contents | Next >

Using Global Variables

Through the magic of encapsulation, the functions youve seen are all totally sealed off and independent from each other. The only way to get information into them is through their parameters, and the only way to get information out of them is from their return values. Well, thats not completely true. There is another way to share information among parts of your programthrough global variables (variables that are accessible from any part of your program).


 

Introducing the Global Reach ProgramDeclaring Global VariablesAccessing Global VariablesHiding Global VariablesAltering Global VariablesMinimizing the Use of Global Variables