Variable Declarations

Description

Variable identifiers are identifiers that have been associated with a variable using a variable declaration. Variable declarations must be placed in variable declaration groups.

Example

Here is an example of a variable declaration group:

   var
      name : string;
      age, heigth : integer;

Syntax

The syntax for variable declaration groups is given below:

(NOTE: for clarity some parts of the syntax are omitted, see Irie Pascal Grammar for the full syntax):

   variable-declaration-group = 'var' variable-declaration { ';' variable-declaration }

   identifier = letter { letter | digit }

   identifier-list = identifier { ',' identifier }

   new-ordinal-type = enumerated-type | subrange-type

   new-pointer-type = '^' domain-type | '@' domain-type

   new-structured-type =
      [ 'packed' ] array-type |
      [ 'packed' ] record-type |
      [ 'packed' ] set-type |
      [ 'packed' ] file-type |
      [ 'packed' ] list-type |
                         object-type |
                         string-type

   new-type = new-ordinal-type | new-structured-type | new-pointer-type

   type-denoter = type-identifier | new-type

   type-identifier = identifier

   variable-declaration = identifier-list ':' type-denoter