Constant definitions

Constant definitions are used to create constant identifiers (i.e. identifiers that are associated with a constant).

Example

const
   Space = ' ';
   message = 'Hello';
   first = 1;
   last = 10;
   DaysInYear = 365.25;
   minint = -maxint;
   linefeed = #10;

Syntax

The syntax for constant definition groups is given below: (NOTE: for clarity some parts of the syntax are omitted, see Irie Pascal Grammar for the full syntax):

   constant-definition-group = 'const' constant-definition ';' { constant-definition ';' }

   constant = [ sign ] integer-number |
                    [ sign ] real-number |
                    [ sign ] constant-identifier |
                               character-literal |
                               string-literal

   constant-definition = identifier '=' constant