This chapter discusses the concept of scope and the impact it has on the visibility of data in different sections of a program. It describes how Public and Private keywords can be used to alter a variable's scope. Finally, it discusses what the lifetime of a variable is and how the Static keyword can be used to extend the lifetime of a variable. Some issues related to both scope and lifetime are not discussed in this chapter. You will learn about them later in the book, when they are in contexts that makes more sense. |