
{: test that a missing comma in the unpack function causes a fatal error}

{$d+}
program e037( output );

type
   tpa = packed array[1..4] of char;
   tppa = ^tpa;

var
   a  : array['a'..'z'] of char;
   pa : packed array[1..4] of char;
   ppa : tppa;
   c  : char;

function f: tppa;
begin
   f := ppa;
end; { f }

begin {e037}

   for c := 'a' to 'z' do
      a[c] := c;
   new(ppa);
   ppa^ := 'LION';
   c := 'w';
   pack( a, c{, ppa^} ); {!!! missing ', & arg' }
   writeln( 'fails: unpack syntax error not detected, ppa^ is ''',
             ppa^, '''' );
   dispose(ppa);
end. { e037 }

