[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 8.1.5 Variable Declaration

A variable declaration looks like this:

    var
      variable identifier: type identifier;
      ...
      variable identifier: type identifier;

or

    var
      variable identifier: type definition;
      ...
      variable identifier: type definition;

and with initializing value:

    var
      variable identifier: type identifier value constant expression;
      ...
      variable identifier: type identifier value constant expression;

or

    var
      variable identifier: type definition value constant expression;
      ...
      variable identifier: type definition value constant expression;

A variable declaration part begins with the reserved word `var`. It declares a variable identifier whose type either can be specified by a type identifier, or by a type definion which either can be an array, a record, a set, a subrange, an enumerated type or a pointer to an type identifier. If `value` is specified followed by a constant expression satisfying the specified type, the variable declared is initialized with constant expression. The reserved word `value` can be replaced by ``='`, however `value` is not allowed in ISO-Pascal and Borland Pascal, and the replacement by ``='` is not allowed in Extended Pascal.

### See also

section 8.2.1 Type Definition, section 8.1.4 Type Declaration, section 8.2 Data Types, section 8.1.7.12 The Declaring Statement, section 8.1.6.4 Subroutine Parameter List Declaration

This document was generated by Frank Heckenbach on May, 10 2002 using texi2html