FunctionsTopTypesVariable Declarations

Variable Declarations

< variable declaration list > -> < variable declaration list > < variable declaration >
|
< variable declaration > -> < type name > < identifier > ;

A variable declaration introduces a name under which the program can store values during execution and specifies the type of values that can be associated with the name during execution. Variable declarations may appear in the body of the main program or in the body of any function. The scope of a declaration is the entire < body > within which it occurs. The names of all variables and functions declared within a single body must be unique.


Computer Science 434
Department of Computer Science
Williams College

FunctionsTopTypesVariable Declarations