A variable declaration consists of a list ofthat designate new variables ( ) and their .
X, Y, Z; Real;
I, J, K: Integer;
Operator: (Plus, Minus, Times);
Hue1, Hue2: set of Color;
Matrix: array[1..10, 1..10] of Real;
The type given for the variable(s) can be a type identifier previously declared
- in a type declaration part in the same block, or
- in an enclosing block, or
- in a
It can also be a new type definition.
When an identifier is specified within the identifier list of a variable declaration, that identifier is a variable identifier for the block in which the declaration occurs. The variable can then be referred to throughout the block, unless the identifier is redeclared in an enclosed block.
Redeclaration creates a new variable using the same identifier, without affecting the value of the original variable.