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

{$d+}
program e034( 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 {e034}

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

