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