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 / array1.pcat < prev    next >
Text File  |  2006-03-05  |  272b  |  16 lines

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