1-- Copyright 2005, 2007, 2008, 2009, 2010, 2011 2-- Free Software Foundation, Inc. 3-- 4-- This program is free software; you can redistribute it and/or modify 5-- it under the terms of the GNU General Public License as published by 6-- the Free Software Foundation; either version 3 of the License, or 7-- (at your option) any later version. 8-- 9-- This program is distributed in the hope that it will be useful, 10-- but WITHOUT ANY WARRANTY; without even the implied warranty of 11-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12-- GNU General Public License for more details. 13-- 14-- You should have received a copy of the GNU General Public License 15-- along with this program. If not, see <http://www.gnu.org/licenses/>. 16 17procedure P is 18 type Index is (One, Two, Three); 19 20 type Table is array (Integer range 1 .. 3) of Integer; 21 type ETable is array (Index) of Integer; 22 type RTable is array (Index range Two .. Three) of Integer; 23 type UTable is array (Positive range <>) of Integer; 24 25 type PTable is array (Index) of Boolean; 26 pragma Pack (PTable); 27 28 function Get_UTable (I : Integer) return UTable is 29 begin 30 return Utable'(1 => I, 2 => 2, 3 => 3); 31 end Get_UTable; 32 33 One_Two_Three : Table := (1, 2, 3); 34 E_One_Two_Three : ETable := (1, 2, 3); 35 R_Two_Three : RTable := (2, 3); 36 U_One_Two_Three : UTable := Get_UTable (1); 37 P_One_Two_Three : PTable := (False, True, True); 38 39 Few_Reps : UTable := (1, 2, 3, 3, 3, 3, 3, 4, 5); 40 Many_Reps : UTable := (1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 5); 41 42 Empty : array (1 .. 0) of Integer := (others => 0); 43 44begin 45 One_Two_Three (1) := 4; -- START 46 E_One_Two_Three (One) := 4; 47 R_Two_Three (Two) := 4; 48 U_One_Two_Three (U_One_Two_Three'First) := 4; 49 P_One_Two_Three (One) := True; 50 51 Few_Reps (Few_Reps'First) := 2; 52 Many_Reps (Many_Reps'First) := 2; 53 54 Empty := (others => 1); 55end P; 56