home *** CD-ROM | disk | FTP | other *** search
/ ftp.ee.pdx.edu / 2014.02.ftp.ee.pdx.edu.tar / ftp.ee.pdx.edu / pub / users / Harry / compilers / p11 / tst / error4a.pcat < prev    next >
Text File  |  2006-03-05  |  258b  |  16 lines

  1. (* This program tests the index-out-of-bounds error. *)
  2.  
  3. program is
  4.  
  5.   type A is array of integer;
  6.   var a: A := nil;
  7.       i: integer := 0;
  8.  
  9. begin
  10.  
  11.   a := A {{ 111, 222, 333 }};
  12.   write ("Should cause an index-out-of-bounds error...");
  13.   i := a [-1];
  14.  
  15. end;
  16.