< Previous | Contents | Next >

Working with Scopes

A variables scope determines where the variable can be seen in your program. Scopes allow you to limit the accessibility of variables and are the key to encapsulation, helping keep separate parts of your program, such as functions, apart from each other.


 

Introducing the Scoping ProgramWorking with Separate ScopesWorking with Nested Scopes