{: test that a non-ordinal index type in a conformant array parameter
   is handled gracefully }

{$d+}
program e137( output );

type
   smallInt = 1..10;

var
   a0: array[smallInt] of integer;
   a1: array[smallInt] of integer;
   a2: array[smallInt] of integer;
   a3: array[smallInt] of integer;

procedure test(aa : array[lo..hi : smallInt] of integer);
var
   aa1 : array[smallInt] of integer;
   z   : smallInt;
   f   :  text;
begin
   z := lo;
   rewrite(f);
   write(f,lo);
   writeln('z is ', z);
   reset(f);
   read(f, lo);   {!!! can't read a new value into a bound id}
   writeln('z is ', z);
end;

begin {e137}

   test(a1);  { OK }
   writeln( 'fails: conformant array error is not detected' );

end. { e137 }

