home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / ada_1 / Examples_ada_alloc_test < prev    next >
Encoding:
Text File  |  1994-08-15  |  471 b   |  21 lines

  1. -- ++
  2. -- run with -h 144
  3. -- --
  4. with Text_IO;
  5. procedure Alloc_Test is
  6.    type Index is new Integer range 0 .. 128000;
  7.    type Big_Array is array ( Index ) of Integer;
  8.    package Index_IO is new Text_IO.Integer_IO ( Index );
  9.    BA : Big_Array;
  10.    Ind : Index;
  11. begin
  12.    for I in Index loop
  13.       BA(I) := Integer(I);
  14.    end loop;
  15.    
  16.    loop
  17.       Index_IO.Get ( Ind );
  18.       exit when Ind = 0;
  19.       Text_IO.Put_Line ( Integer'Image(BA(Ind)) );
  20.    end loop;
  21. end Alloc_Test;