From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fbbb6c094bab8a9d,start X-Google-Attributes: gid103376,public From: cktan@kelly.teleport.com (Chong-Kwan Tan) Subject: Help (gnat 3.04) Date: 1996/06/10 Message-ID: #1/1 X-Deja-AN: 159527649 sender: cktan@kelly.teleport.com organization: Teleport - Portland's Public Access (503) 220-1016 newsgroups: comp.lang.ada Date: 1996-06-10T00:00:00+00:00 List-Id: Hi, I am trying to link all items in an array into a list and gnat 3.04 gives me this error: % gnatmake tt.adb gcc -c tt.adb tt.adb:21:37: object has deeper accessibility level than access type gnatmake: "tt.adb" compilation error Could someone tell me why? Thanks, -tan ==================================================================== 1 procedure TT is 2 3 type Item_Type; 4 type Item_Ptr_Type is access all Item_Type; 5 type Item_Type is 6 record 7 Next : Item_Ptr_Type; 8 end record; 9 type Item_Table_Type is 10 array (Positive range <>) of aliased Item_Type; 11 12 type Pool_Type is 13 record 14 Item : Item_Table_Type(1..10); 15 end record; 16 17 procedure Init 18 (Pool : in out Pool_Type) is 19 begin 20 for I in 2 .. Pool.Item'Last loop 21 Pool.Item(I-1).Next := Pool.Item(I)'Access; 22 end loop; 23 Pool Pool.Item(I)'Access; 22 end loop; 23 Pool.Item(Pool.Item'Last).Next := null; 24 end Init; 25 26 P : Pool_Type; 27 begin 28 Init(P); 29 end TT; -- cktan@teleport.COM Public Access User --- Not affiliated with Teleport Public Access UNIX and Internet at (503) 220-1016 (2400-28800, N81)