{: test that constant expression syntax error causes a compilation error }

program e1063( output );

type
   colour = ( black, brown, red, orange, yellow, green, blue, violet, grey, white);

const
   cm  = pred(maxchar);
   ncm = ord(cm);
   six = -(-(-(-(-(-6)))));

   c11 = (ch(ord(cm) mod 2));              {!!! ch undefined}
   c12 = succ(false,1) add true;           {!!! typo}
   c13 = -1 ^ 2;                           {!!! illegal symbol}

   c21 = ^3;                               {!!! illegal symbol}
   c22 = -+3;                              {!!! extra sign char}
   c23 = 2 + -3;                           {!!! extra sign char}
   c24 = 2 + 0.3;                          {!!! real mumber}
   c25 = ncm/2;                            {!!! / is real operator}
   c26 = 2 + six                           {!!! missing ';'}
   c26a = +2;
   c27 = +2;                               {OK}
   c28 = left op right;                    {!!! undefined opeator and operands}

   c30 = ord(1.2345678);                   {!!! illegal}
   c31 = ord('string');                    {!!! illegal}
   c32 = pred('c', 1);                     {OK}
   c33 = succ(red, 2);                     {OK}
   c34 = pred('c', 1.2345678);             {!!! illegal}
   c35 = succ(red, 'string');              {!!! illegal}
   c36 = pred('c', red);                   {!!! illegal}
   c37 = succ(red, red);                   {!!! illegal}
   c38 = pred(1.2345678, 1);               {!!! illegal}
   c39 = succ('string', 1);                {!!! illegal}

type
   t01 = array[(chr(ord(cm) div 2)) .. maxchar] of char;  {OK}
   t02 = (chr(ord(cm) div 2)) .. maxchar;                 {OK}
   t03 = array[t02] of boolean;                           {OK}
   t04 = array[cm .. maxchar] of real;                    {OK}

var
   e : colour;
   n : integer;
   s : packed array[1..six] of char;

begin { e1063 }

   e := black;
   n := 2;

   writeln( 'constant expression syntax error not detected' );
end. { e1063 }

