
{: test that out of bounds array index causes a fatal error }

{$d+}
program d014( output );
type rind = 8..24;
var
   abr : array[boolean,rind] of real;
   k  : integer;

function side : integer;
begin
   side := k;
   k := k+1;
end;
begin {d014}
   k := 24;
   abr[false,side] := 6;
   if k <> 25 then
      writeln( 'side effect error evaluating array index' );

   k := 25;
   writeln( 'abr[true,', k:1, '] is ', abr[true,k]:1:1 );
end. { d014 }

