< Previous | Contents | Next >

Using References

A reference provides another name for a variable. Whatever you do to a reference is done to the variable to which it refers. You can think of a reference as a nickname for a variableanother name that the variable goes by. In the first program in this chapter, Ill show you how to create references. Then, in the next few programs, Ill show you why youd want to use references and how they can improve your game programs.


 

Introducing the Referencing ProgramCreating ReferencesAccessing Referenced ValuesAltering Referenced Values